1 /* Martin Asser Hansen (mail@maasha.dk) Copyright (C) 2008 - All right reserved */
3 /* Get a pointer with a given size of allocated memory. */
4 void *mem_get( size_t size );
6 /* Get a pointer with a given size of allocated and zero'ed memory. */
7 void *mem_get_zero( size_t size );
9 /* Resize allocated memory for a given pointer. */
10 void *mem_resize( void *pt, size_t size );
12 /* Resize allocated memory for a given pointer with extra memory zero'ed. */
13 void *mem_resize_zero( void *pt, size_t old_size, size_t new_size );
15 /* Clone a structure in memory and return a pointer to the clone. */
16 void *mem_clone( void *old_pt, size_t size );
18 /* Free memory from a given pointer. */
19 /* Usage: mem_free( &pt ) */
20 void mem_free( void *pt );