sheepy

build system (sheepy) and package manager (spm) for C
git clone https://spartatek.se/git/sheepy.git
Log | Files | Refs | README | LICENSE

MemoryManager (1301B)


      1 /* -*- C++ -*- vim: set syntax=cpp: */
      2 #ifndef __QUEX_INCLUDE_GUARD__MEMORY_MANAGER
      3 #define __QUEX_INCLUDE_GUARD__MEMORY_MANAGER
      4 
      5 #include <stddef.h>
      6 #include "compatStdint.h"
      7 #include "definitions"
      8 
      9 #ifndef QUEX_TYPE_DEFINITIONS_MEMORY_MANAGER
     10 #define QUEX_TYPE_DEFINITIONS_MEMORY_MANAGER
     11 typedef enum {
     12     E_MemoryObjectType_BUFFER,
     13     E_MemoryObjectType_BUFFER_MEMORY,
     14     E_MemoryObjectType_BYTE_LOADER,
     15     E_MemoryObjectType_BUFFER_FILLER,
     16     E_MemoryObjectType_BUFFER_RAW,
     17     E_MemoryObjectType_CONVERTER,
     18     E_MemoryObjectType_MEMENTO,
     19     E_MemoryObjectType_POST_CATEGORIZER_NODE,
     20     E_MemoryObjectType_TEXT,
     21     E_MemoryObjectType_TOKEN_ARRAY
     22 } E_MemoryObjectType;
     23  
     24 typedef enum {
     25     E_Ownership_LEXICAL_ANALYZER,
     26     E_Ownership_EXTERNAL
     27 } E_Ownership;
     28 #endif
     29 
     30 QUEX_NAMESPACE_QUEX_OPEN
     31 
     32 extern uint8_t*
     33 QUEXED_DEF(MemoryManager_allocate)(const size_t ByteN, E_MemoryObjectType);
     34 
     35 extern void 
     36 QUEXED_DEF(MemoryManager_free)(void* Obj, E_MemoryObjectType);
     37 
     38 extern size_t
     39 QUEXED_DEF(MemoryManager_insert)(uint8_t* drain_begin_p,  uint8_t* drain_end_p,
     40                                  uint8_t* source_begin_p, uint8_t* source_end_p);
     41 
     42 extern bool 
     43 QUEXED_DEF(system_is_little_endian)(void);
     44 
     45 QUEX_NAMESPACE_QUEX_CLOSE
     46  
     47 #endif /* __INCLUDE_GUARD_QUEX__CODE_BASE__MEMORY_MANAGER__ */