diff options
Diffstat (limited to 'drivers/staging/nmf-cm/cm/engine/memory/inc')
3 files changed, 8 insertions, 6 deletions
diff --git a/drivers/staging/nmf-cm/cm/engine/memory/inc/domain.h b/drivers/staging/nmf-cm/cm/engine/memory/inc/domain.h index bf75915c259..07caee2d8c1 100644 --- a/drivers/staging/nmf-cm/cm/engine/memory/inc/domain.h +++ b/drivers/staging/nmf-cm/cm/engine/memory/inc/domain.h @@ -52,6 +52,7 @@ typedef struct { t_cm_domain_id parent_ref; //parent domain reference } child; } scratch; + void *dbgCooky; //pointer to OS internal data } t_cm_domain_desc; #ifdef DEBUG diff --git a/drivers/staging/nmf-cm/cm/engine/memory/inc/remote_allocator.h b/drivers/staging/nmf-cm/cm/engine/memory/inc/remote_allocator.h index e639c94cb46..f556c6f7056 100644 --- a/drivers/staging/nmf-cm/cm/engine/memory/inc/remote_allocator.h +++ b/drivers/staging/nmf-cm/cm/engine/memory/inc/remote_allocator.h @@ -76,8 +76,11 @@ typedef t_cm_chunk* t_memory_handle; //TODO, juraj, add memType to alloc struct ? typedef struct cm_allocator_desc { const char *pAllocName; /* Name of the allocator */ - t_uint32 size; /* Size of the allocator */ + t_uint32 maxSize; /* Max size of the allocator -> Potentially increase/decrease by stack management */ + t_uint32 sbrkSize; /* Current size of allocator */ + t_uint32 offset; /* Offset of the allocator */ t_cm_chunk *chunks; /* Array of chunk */ + t_cm_chunk *lastChunk; /* Null terminated last chunk of previous array declaration */ t_cm_chunk *free_mem_chunks[BINS]; /* List of free memory */ struct cm_allocator_desc* next; /* List of allocator */ } t_cm_allocator_desc; @@ -158,12 +161,11 @@ PUBLIC t_memory_handle cm_MM_Alloc( * * \ingroup MEMORY_INTERNAL */ -PUBLIC t_memory_handle cm_MM_Realloc( +PUBLIC t_cm_error cm_MM_Realloc( t_cm_allocator_desc* alloc, const t_cm_size size, const t_uint32 offset, - const t_cm_memory_alignment memAlignment, - const t_memory_handle handle); + t_memory_handle *handle); /*! * \brief Frees the allocated chunk * diff --git a/drivers/staging/nmf-cm/cm/engine/memory/inc/remote_allocator_utils.h b/drivers/staging/nmf-cm/cm/engine/memory/inc/remote_allocator_utils.h index ce99e4d7a94..0a7c901187b 100644 --- a/drivers/staging/nmf-cm/cm/engine/memory/inc/remote_allocator_utils.h +++ b/drivers/staging/nmf-cm/cm/engine/memory/inc/remote_allocator_utils.h @@ -20,14 +20,13 @@ typedef enum { PUBLIC void updateFreeList(t_cm_allocator_desc* alloc, t_cm_chunk* chunk); -PUBLIC void linkChunk(t_cm_chunk* prev,t_cm_chunk* add); +PUBLIC void linkChunk(t_cm_allocator_desc* alloc, t_cm_chunk* prev,t_cm_chunk* add); PUBLIC void unlinkChunk(t_cm_allocator_desc* alloc,t_cm_chunk* current); PUBLIC void unlinkFreeMem(t_cm_allocator_desc* alloc,t_cm_chunk* current); PUBLIC void linkFreeMemBefore(t_cm_chunk* add, t_cm_chunk* next); PUBLIC void linkFreeMemAfter(t_cm_chunk* prev,t_cm_chunk* add); -PUBLIC void mergeChunk(t_cm_allocator_desc* alloc,t_cm_chunk *c,t_cm_chunk *destroy); PUBLIC t_cm_chunk* splitChunk(t_cm_allocator_desc* alloc, t_cm_chunk *chunk, t_uint32 offset, t_mem_split_position position); #endif /*REMOTE_ALLOCATOR_UTILS_H_*/ |