Comments
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include <stdint.h>
|
||||
#include <assert.h>
|
||||
|
||||
// Repurpose free memory to eep a linked list of free slots
|
||||
//Free memory is reused to build a linked list of slots
|
||||
typedef struct UCSlot UCSlot;
|
||||
struct UCSlot {
|
||||
UCSlot *next;
|
||||
@@ -66,6 +66,9 @@ static inline void *uc_slot_alloc(UCSlotArena *arena)
|
||||
if (slot != NULL) {
|
||||
arena->free_list = slot->next;
|
||||
arena->used_slots++;
|
||||
#ifdef DEBUG
|
||||
memset(slot, 0xCB, arena->slot_size);
|
||||
#endif
|
||||
}
|
||||
|
||||
return slot;
|
||||
|
||||
Reference in New Issue
Block a user