Philipe@20: /* Philipe@20: * Copyright 2009 OpenSourceCodeStewardshipFoundation.org Philipe@20: * Licensed under GNU General Public License version 2 Philipe@20: * Philipe@20: * Author: seanhalle@yahoo.com Philipe@20: * Philipe@20: * Created on November 14, 2009, 9:07 PM Philipe@20: */ Philipe@20: Philipe@20: #ifndef _PRMALLOC_H Philipe@20: #define _PRMALLOC_H Philipe@20: Philipe@20: #include Philipe@20: #include Philipe@20: #include Philipe@20: #include Philipe@20: Philipe@20: void * Philipe@20: PR_int__malloc( size_t sizeRequested ); Philipe@20: Philipe@20: void * Philipe@20: PR_int__malloc_aligned( size_t sizeRequested ); Philipe@20: Philipe@20: void Philipe@20: PR_int__free( void *ptrToFree ); Philipe@20: Philipe@20: //Use these in application code directly Philipe@20: #define \ Philipe@20: PR__malloc PR_WL__malloc Philipe@20: Philipe@20: #define \ Philipe@20: PR__free PR_WL__free Philipe@20: Philipe@20: //these are implemented in the PR leaf implementation Philipe@20: void * Philipe@20: PR_WL__malloc( int32 sizeRequested ); Philipe@20: Philipe@20: void Philipe@20: PR_WL__free( void *ptrToFree ); Philipe@20: Philipe@20: Philipe@20: /*Allocates memory from the external system -- higher overhead Philipe@20: */ Philipe@20: void * Philipe@20: PR_ext__malloc_in_ext( size_t sizeRequested ); Philipe@20: Philipe@20: /*Frees memory that was allocated in the external system -- higher overhead Philipe@20: */ Philipe@20: void Philipe@20: PR_ext__free_in_ext( void *ptrToFree ); Philipe@20: seanhalle@0: #endif