annotate prmalloc.h @ 20:f3cb11baf791

Fully working longjmp, get_sched based. Also OS Portability work included. Related library_proto-runtime commit: 45dc6d5afb2d
author Philipe Louchtch
date Fri, 09 May 2014 11:19:53 +0200
parents c3829f630c2f
children
rev   line source
Philipe@20 1 /*
Philipe@20 2 * Copyright 2009 OpenSourceCodeStewardshipFoundation.org
Philipe@20 3 * Licensed under GNU General Public License version 2
Philipe@20 4 *
Philipe@20 5 * Author: seanhalle@yahoo.com
Philipe@20 6 *
Philipe@20 7 * Created on November 14, 2009, 9:07 PM
Philipe@20 8 */
Philipe@20 9
Philipe@20 10 #ifndef _PRMALLOC_H
Philipe@20 11 #define _PRMALLOC_H
Philipe@20 12
Philipe@20 13 #include <malloc.h>
Philipe@20 14 #include <inttypes.h>
Philipe@20 15 #include <math.h>
Philipe@20 16 #include <PR__include/PR__primitive_data_types.h>
Philipe@20 17
Philipe@20 18 void *
Philipe@20 19 PR_int__malloc( size_t sizeRequested );
Philipe@20 20
Philipe@20 21 void *
Philipe@20 22 PR_int__malloc_aligned( size_t sizeRequested );
Philipe@20 23
Philipe@20 24 void
Philipe@20 25 PR_int__free( void *ptrToFree );
Philipe@20 26
Philipe@20 27 //Use these in application code directly
Philipe@20 28 #define \
Philipe@20 29 PR__malloc PR_WL__malloc
Philipe@20 30
Philipe@20 31 #define \
Philipe@20 32 PR__free PR_WL__free
Philipe@20 33
Philipe@20 34 //these are implemented in the PR leaf implementation
Philipe@20 35 void *
Philipe@20 36 PR_WL__malloc( int32 sizeRequested );
Philipe@20 37
Philipe@20 38 void
Philipe@20 39 PR_WL__free( void *ptrToFree );
Philipe@20 40
Philipe@20 41
Philipe@20 42 /*Allocates memory from the external system -- higher overhead
Philipe@20 43 */
Philipe@20 44 void *
Philipe@20 45 PR_ext__malloc_in_ext( size_t sizeRequested );
Philipe@20 46
Philipe@20 47 /*Frees memory that was allocated in the external system -- higher overhead
Philipe@20 48 */
Philipe@20 49 void
Philipe@20 50 PR_ext__free_in_ext( void *ptrToFree );
Philipe@20 51
seanhalle@0 52 #endif