- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

# /space/home/slher/rel/Beken/v6_4_5/macsw/modules/ke/src/ke_mem.h

Go to the documentation of this file.

    00001
    00015 #ifndef _KE_MEM_H_
    00016 #define _KE_MEM_H_
    00017
    00031 /*
    00032  * INCLUDE FILES
    00033  ****************************************************************************************
    00034  */
    00035 // standard includes
    00036 #include "co_int.h"
    00037
    00038 // for compilation directives
    00039 #include "ke_config.h"
    00040
    00041
    00042 #if KE_MEM_NX
    00043
    00044 // forward declarations
    00045 struct mblock_free;
    00046
    00062 struct mblock_free *ke_mem_init(void);
    00063
    00077 void *ke_malloc(uint32_t size);
    00078
    00090 void ke_free(void *mem_ptr);
    00091
    00092
    00093 #elif KE_MEM_LINUX
    00094 // Wrappers to Linux mem functions here
    00095
    00096 #include <linux/slab.h>
    00097
    00098 __INLINE void *ke_malloc(uint32_t size)
    00099 {
    00100     return kmalloc(size, GFP_KERNEL);
    00101 }
    00102
    00103 __INLINE void ke_free (void * mem_ptr)
    00104 {
    00105     kfree(mem_ptr);
    00106 }
    00107
    00108
    00109
    00110 #elif KE_MEM_LIBC
    00111 // Wrapper to lib C mem functions here
    00112 #include <stdlib.h>
    00113
    00114 __INLINE void *ke_malloc(uint32_t size) { return malloc(size); }
    00115
    00116 __INLINE void ke_free(void * mem_ptr) { free(mem_ptr); }
    00117
    00118 #endif
    00119
    00121
    00122 #endif // _KE_MEM_H_
    00123