|
Functions | |
| void * | malloc (size_t size) |
| Allocate size bytes of dynamic memory. | |
| void * | zalloc (size_t size) |
| Allocate size bytes of zero-initialized dynamic memory. | |
| static void | free (void *ptr) |
| Free a memory object previously allocated by malloc(). | |
This implementation of malloc() is very lightweight, but it does not include free(), realloc() or any other fancy features. It is useful when including drivers that rely on malloc() during initialization, but not for general dynamic memory management.
| static void free | ( | void * | ptr | ) | [inline, static] |
Free a memory object previously allocated by malloc().
This will return the memory at ptr back to the dynamic memory allocator. ptr must point to a block of memory previously returned by malloc() or any of the associated functions, and must not have been passed to free() since then.
| ptr | Pointer to the memory object to be freed. |
| void* malloc | ( | size_t | size | ) |
Allocate size bytes of dynamic memory.
Definition at line 52 of file malloc_simple.c.
References assert, cpu_sram_pool, PHYS_MAP_WRBACK, PHYS_MAP_WRBUF, PHYSMEM_ALLOC_ERR, physmem_alloc_low(), and physmem_map().
Referenced by zalloc().
| void* zalloc | ( | size_t | size | ) |
Allocate size bytes of zero-initialized dynamic memory.
Definition at line 68 of file malloc_simple.c.
1.6.3