Mercurial > cgi-bin > hgwebdir.cgi > PR > PR_Implementations > PR__Univ > PR__includes > PR__include
comparison prmalloc.h @ 4:10986666560d
Changes on copy on D:
| author | Sean Halle <seanhalle@yahoo.com> |
|---|---|
| date | Sun, 15 Sep 2013 07:18:46 -0700 |
| parents | |
| children | 14241f07f742 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:ff92e2fa96d5 |
|---|---|
| 1 /* | |
| 2 * Copyright 2009 OpenSourceCodeStewardshipFoundation.org | |
| 3 * Licensed under GNU General Public License version 2 | |
| 4 * | |
| 5 * Author: seanhalle@yahoo.com | |
| 6 * | |
| 7 * Created on November 14, 2009, 9:07 PM | |
| 8 */ | |
| 9 | |
| 10 #ifndef _PRMALLOC_H | |
| 11 #define _PRMALLOC_H | |
| 12 | |
| 13 #include <malloc.h> | |
| 14 #include <inttypes.h> | |
| 15 #include <math.h> | |
| 16 #include <PR__include/PR__primitive_data_types.h> | |
| 17 | |
| 18 void * | |
| 19 PR_int__malloc( size_t sizeRequested ); | |
| 20 | |
| 21 void * | |
| 22 PR_int__malloc_aligned( size_t sizeRequested ); | |
| 23 | |
| 24 void | |
| 25 PR_int__free( void *ptrToFree ); | |
| 26 | |
| 27 //Use these in application code directly | |
| 28 #define \ | |
| 29 PR__malloc PR_WL__malloc | |
| 30 | |
| 31 #define \ | |
| 32 PR__free PR_WL__free | |
| 33 | |
| 34 //these are implemented in the PR leaf implementation | |
| 35 void * | |
| 36 PR_WL__malloc( int32 sizeRequested ); | |
| 37 | |
| 38 void | |
| 39 PR_WL__free( void *ptrToFree ); | |
| 40 | |
| 41 | |
| 42 /*Allocates memory from the external system -- higher overhead | |
| 43 */ | |
| 44 void * | |
| 45 PR_ext__malloc_in_ext( size_t sizeRequested ); | |
| 46 | |
| 47 /*Frees memory that was allocated in the external system -- higher overhead | |
| 48 */ | |
| 49 void | |
| 50 PR_ext__free_in_ext( void *ptrToFree ); | |
| 51 | |
| 52 #endif |
