|
Embedded Artistry Framework
Embedded Systems C++ Framework
|

Functions | |
| void | malloc_addblock (void *addr, size_t size) |
| Assign blocks of memory for use by malloc(). More... | |
| __attribute__ ((weak)) void malloc_init() | |
| void * | malloc (size_t size) |
| Allocates size bytes of uninitialized storage. More... | |
| void | free (void *ptr) |
| Deallocates allocated memory space. More... | |
| __attribute__ | ( | (weak) | ) |
References embvm::VirtualHeap< THeapImpl >::init().
| void free | ( | void * | ptr | ) |
Deallocates allocated memory space.
Deallocates the space previously allocated by
The behavior is undefined if the value of ptr does not equal a value returned earlier by
The behavior is undefined if the memory area referred to by ptr has already been deallocated, that is, free() or realloc has already been called with ptr as the argument and no calls to malloc, calloc or realloc resulted in a pointer equal to ptr afterwards.
The behavior is undefined if after free returns, an access is made through the pointer ptr (unless another allocation function happened to result in a pointer value equal to ptr)
| ptr | pointer to the memory to deallocate |
References embvm::VirtualHeap< THeapImpl >::free().
| void* malloc | ( | size_t | size | ) |
Allocates size bytes of uninitialized storage.
If size is zero, the behavior is implementation defined (null pointer may be returned, or some non-null pointer may be returned that may not be used to access storage, but has to be passed to
| size | number of bytes to allocate |
References embvm::VirtualHeap< THeapImpl >::alloc().
| void malloc_addblock | ( | void * | addr, |
| size_t | size | ||
| ) |
Assign blocks of memory for use by malloc().
Initializes the malloc() backend with a memory address and memory pool size. This memory is assumed to be owned by malloc() and is vended out when memory is requested. Multiple blocks can be added.
NOTE: This API must be called before malloc() can be used. If you call malloc() before allocating memory, malloc() will return NULL because there is no available memory to provide to the user.
| addr | Pointer to the memory block address that you are providing to malloc() |
| size | Size of the memory block that you are providing to malloc() |
References embvm::VirtualHeap< THeapImpl >::addBlock().
1.8.15