Skip to content

Heap initialization value other than zero. #68

@user2222222222

Description

@user2222222222

It would be nice to be able to initialize the heap to something other than zero (such as a checker pattern: 0x55).
#define UMM_HEAPINIT 0x55

It looks like these are the only changes needed in umm_multi_init_heap(), but thought I'd bring it up here in case you think it's worth adding, but mainly to make sure I'm not missing something:

    memset(UMM_HEAP, UMM_HEAPINIT, UMM_HEAPSIZE);

    UMM_NBLOCK(0) = 1;
    UMM_PBLOCK(0) = 0;
    UMM_NFREE(0) = 1;
    UMM_PFREE(0) = 1;

    UMM_NBLOCK(1) = UMM_BLOCK_LAST | UMM_FREELIST_MASK;
    UMM_PBLOCK(1) = 0;
    UMM_NFREE(1) = 0;
    UMM_PFREE(1) = 0;

    UMM_NBLOCK(UMM_BLOCK_LAST) = 0;
    UMM_PBLOCK(UMM_BLOCK_LAST) = 1;
    UMM_NFREE(UMM_BLOCK_LAST) = 0;
    UMM_PFREE(UMM_BLOCK_LAST) = 0;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions