Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP][libc] Add freelist malloc #94270

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PiJoules
Copy link
Contributor

@PiJoules PiJoules commented Jun 3, 2024

No description provided.

@petrhosek
Copy link
Member

I'd consider splitting the libc/src/__support/CPP changes to its own PR and where possible also provide a test.

@PiJoules PiJoules force-pushed the WIP-libc-malloc-clone-2 branch 2 times, most recently from ff59f57 to b1c2777 Compare June 4, 2024 21:45
@PiJoules
Copy link
Contributor Author

PiJoules commented Jun 4, 2024

I'd consider splitting the libc/src/__support/CPP changes to its own PR and where possible also provide a test.

Yup, much of the CPP changes are in their own PRs separate from this that I'm landing independently.

PiJoules added a commit to PiJoules/llvm-project that referenced this pull request Jun 4, 2024
A block represents a chunk of memory used by the freelist allocator. It
contains header information denoting the usable space and pointers as
offsets to the next and previous block.

On it's own, this doesn't do much. This is a part of
llvm#94270 to land in smaller
patches.

This is a subset of pigweed's freelist allocator implementation.
PiJoules added a commit to PiJoules/llvm-project that referenced this pull request Jun 7, 2024
A block represents a chunk of memory used by the freelist allocator. It
contains header information denoting the usable space and pointers as
offsets to the next and previous block.

On it's own, this doesn't do much. This is a part of
llvm#94270 to land in smaller
patches.

This is a subset of pigweed's freelist allocator implementation.
PiJoules added a commit to PiJoules/llvm-project that referenced this pull request Jun 7, 2024
A block represents a chunk of memory used by the freelist allocator. It
contains header information denoting the usable space and pointers as
offsets to the next and previous block.

On it's own, this doesn't do much. This is a part of
llvm#94270 to land in smaller
patches.

This is a subset of pigweed's freelist allocator implementation.
PiJoules added a commit to PiJoules/llvm-project that referenced this pull request Jun 7, 2024
A block represents a chunk of memory used by the freelist allocator. It
contains header information denoting the usable space and pointers as
offsets to the next and previous block.

On it's own, this doesn't do much. This is a part of
llvm#94270 to land in smaller
patches.

This is a subset of pigweed's freelist allocator implementation.
PiJoules added a commit to PiJoules/llvm-project that referenced this pull request Jun 10, 2024
A block represents a chunk of memory used by the freelist allocator. It
contains header information denoting the usable space and pointers as
offsets to the next and previous block.

On it's own, this doesn't do much. This is a part of
llvm#94270 to land in smaller
patches.

This is a subset of pigweed's freelist allocator implementation.
PiJoules added a commit to PiJoules/llvm-project that referenced this pull request Jun 10, 2024
A block represents a chunk of memory used by the freelist allocator. It
contains header information denoting the usable space and pointers as
offsets to the next and previous block.

On it's own, this doesn't do much. This is a part of
llvm#94270 to land in smaller
patches.

This is a subset of pigweed's freelist allocator implementation.
PiJoules added a commit that referenced this pull request Jun 10, 2024
A block represents a chunk of memory used by the freelist allocator. It
contains header information denoting the usable space and pointers as
offsets to the next and previous block.

On it's own, this doesn't do much. This is a part of
#94270 to land in smaller
patches.

This is a subset of pigweed's freelist allocator implementation.
PiJoules added a commit to PiJoules/llvm-project that referenced this pull request Jun 10, 2024
This implements a traditional freelist to be used by the freelist
allocator. It operates on spans of bytes which can be anything. The
freelist allocator will store Blocks inside them.

This is a part of llvm#94270 to land in smaller patches.
PiJoules added a commit to PiJoules/llvm-project that referenced this pull request Jun 10, 2024
This implements a traditional freelist to be used by the freelist
allocator. It operates on spans of bytes which can be anything. The
freelist allocator will store Blocks inside them.

This is a part of llvm#94270 to land in smaller patches.
PiJoules added a commit that referenced this pull request Jun 11, 2024
This implements a traditional freelist to be used by the freelist
allocator. It operates on spans of bytes which can be anything. The
freelist allocator will store Blocks inside them.

This is a part of #94270 to land in smaller patches.
PiJoules added a commit to PiJoules/llvm-project that referenced this pull request Jun 11, 2024
This is the actual freelist allocator which utilizes the generic
FreeList and the Block classes. We will eventually wrap the malloc
interface around this.

This is a part of llvm#94270 to land in smaller patches.
Lukacma pushed a commit to Lukacma/llvm-project that referenced this pull request Jun 12, 2024
A block represents a chunk of memory used by the freelist allocator. It
contains header information denoting the usable space and pointers as
offsets to the next and previous block.

On it's own, this doesn't do much. This is a part of
llvm#94270 to land in smaller
patches.

This is a subset of pigweed's freelist allocator implementation.
Lukacma pushed a commit to Lukacma/llvm-project that referenced this pull request Jun 12, 2024
This implements a traditional freelist to be used by the freelist
allocator. It operates on spans of bytes which can be anything. The
freelist allocator will store Blocks inside them.

This is a part of llvm#94270 to land in smaller patches.
@PiJoules PiJoules force-pushed the WIP-libc-malloc-clone-2 branch 3 times, most recently from 71ceb75 to 0d2511d Compare June 12, 2024 22:41
PiJoules added a commit to PiJoules/llvm-project that referenced this pull request Jun 12, 2024
This is the actual freelist allocator which utilizes the generic
FreeList and the Block classes. We will eventually wrap the malloc
interface around this.

This is a part of llvm#94270 to land in smaller patches.
PiJoules added a commit to PiJoules/llvm-project that referenced this pull request Jun 13, 2024
This is the actual freelist allocator which utilizes the generic
FreeList and the Block classes. We will eventually wrap the malloc
interface around this.

This is a part of llvm#94270 to land in smaller patches.
PiJoules added a commit that referenced this pull request Jun 13, 2024
This is the actual freelist allocator which utilizes the generic
FreeList and the Block classes. We will eventually wrap the malloc
interface around this.

This is a part of #94270 to land in smaller patches.
@PiJoules PiJoules force-pushed the WIP-libc-malloc-clone-2 branch 2 times, most recently from 3106683 to 843ea00 Compare June 13, 2024 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants