Mercurial > cgi-bin > hgwebdir.cgi > PR > PR_Implementations > PR__Univ > PR__includes > PR__include
diff prmalloc.h @ 0:d460a47ed2d6
public headers for the initial ML split into libraries, as seed for Univ
| author | Sean Halle <seanhalle@yahoo.com> |
|---|---|
| date | Thu, 08 Aug 2013 02:39:56 -0700 |
| parents | |
| children | 14241f07f742 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/prmalloc.h Thu Aug 08 02:39:56 2013 -0700 1.3 @@ -0,0 +1,52 @@ 1.4 +/* 1.5 + * Copyright 2009 OpenSourceCodeStewardshipFoundation.org 1.6 + * Licensed under GNU General Public License version 2 1.7 + * 1.8 + * Author: seanhalle@yahoo.com 1.9 + * 1.10 + * Created on November 14, 2009, 9:07 PM 1.11 + */ 1.12 + 1.13 +#ifndef _PRMALLOC_H 1.14 +#define _PRMALLOC_H 1.15 + 1.16 +#include <malloc.h> 1.17 +#include <inttypes.h> 1.18 +#include <math.h> 1.19 +#include <PR__include/PR__primitive_data_types.h> 1.20 + 1.21 +void * 1.22 +PR_int__malloc( size_t sizeRequested ); 1.23 + 1.24 +void * 1.25 +PR_int__malloc_aligned( size_t sizeRequested ); 1.26 + 1.27 +void 1.28 +PR_int__free( void *ptrToFree ); 1.29 + 1.30 +//Use these in application code directly 1.31 +#define \ 1.32 +PR__malloc PR_WL__malloc 1.33 + 1.34 +#define \ 1.35 +PR__free PR_WL__free 1.36 + 1.37 +//these are implemented in the PR leaf implementation 1.38 +void * 1.39 +PR_WL__malloc( int32 sizeRequested ); 1.40 + 1.41 +void 1.42 +PR_WL__free( void *ptrToFree ); 1.43 + 1.44 + 1.45 +/*Allocates memory from the external system -- higher overhead 1.46 + */ 1.47 +void * 1.48 +PR_ext__malloc_in_ext( size_t sizeRequested ); 1.49 + 1.50 +/*Frees memory that was allocated in the external system -- higher overhead 1.51 + */ 1.52 +void 1.53 +PR_ext__free_in_ext( void *ptrToFree ); 1.54 + 1.55 +#endif 1.56 \ No newline at end of file
