* Calling realloc() with a new size of zero is a valid way to free a
* memory block.
*/
-__attribute__ ((malloc))
userptr_t urealloc ( userptr_t ptr, size_t new_size ) {
struct external_memory extmem;
userptr_t new = ptr;
*
* Memory is guaranteed to be aligned to a page boundary.
*/
-__attribute__ ((malloc))
userptr_t umalloc ( size_t size ) {
return urealloc ( UNULL, size );
}
*
* @c align must be a power of two. @c size may not be zero.
*/
-__attribute__ ((malloc))
void * alloc_memblock ( size_t size, size_t align ) {
struct memory_block *block;
size_t align_mask;
* Calling realloc() with a new size of zero is a valid way to free a
* memory block.
*/
-__attribute__ ((malloc))
void * realloc ( void *old_ptr, size_t new_size ) {
struct autosized_block *old_block;
struct autosized_block *new_block;
* Allocates memory with no particular alignment requirement. @c ptr
* will be aligned to at least a multiple of sizeof(void*).
*/
-__attribute__ ((malloc))
void * malloc ( size_t size ) {
return realloc ( NULL, size );
}
* This function name is non-standard, but pretty intuitive.
* zalloc(size) is always equivalent to calloc(1,size)
*/
-__attribute__ ((malloc))
void * zalloc ( size_t size ) {
void *data;
#define sslAssert( ... ) assert ( __VA_ARGS__ )
-static inline __attribute__ (( always_inline )) __attribute__ ((malloc))
-void *
+static inline __attribute__ (( always_inline )) void *
psMalloc ( psPool_t *pool __unused, size_t len ) {
return malloc ( len );
}
-static inline __attribute__ (( always_inline )) __attribute__ ((malloc))
-void *
+static inline __attribute__ (( always_inline )) void *
psRealloc ( void *ptr, size_t len ) {
return realloc ( ptr, len );
}