Skip to content

Bug in Free List Allocator on 32bit systems #18

@kochol

Description

@kochol

Hi
There is a bug in your Free List Allocator when alignmentPadding is not zero like on 32 bit systems.

const std::size_t alignmentPadding = padding - allocationHeaderSize;

One bug is here obviously and newFreeNode address is inside of the current block when alignmentPadding is not zero.

Node * newFreeNode = (Node *)((std::size_t) affectedNode + requiredSize);

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