|
sc68fordevelopers
2.2.1
|
memory allocation handler. More...
Go to the source code of this file.
Typedefs | |
| typedef void *(* | sc68_alloc_t )(unsigned int) |
| Alloc function (malloc). | |
| typedef void(* | sc68_free_t )(void *) |
| Free function (free). | |
Functions | |
| void * | SC68alloc (unsigned int n) |
| Allocate dynamic memory. | |
| void | SC68free (void *data) |
| Free dynamic memory. | |
| sc68_alloc_t | SC68set_alloc (sc68_alloc_t alloc) |
| Set/get dynamic memory allocation handler. | |
| sc68_free_t | SC68set_free (sc68_free_t free) |
| Set/get dynamic memory free handler. | |
memory allocation handler.
SC68 memory allocation handler module provides function to allocate and free memory buffer.
| typedef void*(* sc68_alloc_t)(unsigned int) |
Alloc function (malloc).
| typedef void(* sc68_free_t)(void *) |
Free function (free).
| void* SC68alloc | ( | unsigned int | n | ) |
Allocate dynamic memory.
The SC68alloc() function calls user defined dynamic memory allocation handler.
| n | Size of buffer to allocate. |
| 0 | error |
| void SC68free | ( | void * | data | ) |
Free dynamic memory.
The SC68free() function calls user defined dynamic memory free handler.
| data | Previously allocated memory buffer. |
| 0 | Failure. |
| sc68_alloc_t SC68set_alloc | ( | sc68_alloc_t | alloc | ) |
Set/get dynamic memory allocation handler.
| alloc | Set new alloc handler (0:get old value). |
| sc68_free_t SC68set_free | ( | sc68_free_t | free | ) |
Set/get dynamic memory free handler.
| free | Set new free handler (0:get old value). |
1.7.5.1