Skip to content

[WIP][libc] Add freelist malloc - #94270

Closed
PiJoules wants to merge 1 commit into
llvm:mainfrom
PiJoules:WIP-libc-malloc-clone-2
Closed

[WIP][libc] Add freelist malloc#94270
PiJoules wants to merge 1 commit into
llvm:mainfrom
PiJoules:WIP-libc-malloc-clone-2

Conversation

@PiJoules

@PiJoules PiJoules commented Jun 3, 2024

Copy link
Copy Markdown
Contributor

No description provided.

@PiJoules
PiJoules requested a review from petrhosek June 3, 2024 18:45
@PiJoules
PiJoules force-pushed the WIP-libc-malloc-clone-2 branch from 7544719 to 911182a Compare June 4, 2024 01:00
Comment thread libc/src/stdlib/freelist.cpp Outdated
Comment thread libc/src/__support/CPP/new.h Outdated
Comment thread libc/src/stdlib/freelist.cpp Outdated
Comment thread libc/src/stdlib/freelist.cpp Outdated
Comment thread libc/src/sys/stat/linux/kernel_statx.h Outdated
@petrhosek

Copy link
Copy Markdown
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

PiJoules commented Jun 4, 2024

Copy link
Copy Markdown
Contributor Author

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
PiJoules force-pushed the WIP-libc-malloc-clone-2 branch from b1c2777 to 519d471 Compare June 6, 2024 20:24
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
PiJoules force-pushed the WIP-libc-malloc-clone-2 branch from 519d471 to 2779336 Compare June 10, 2024 20:40
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
PiJoules force-pushed the WIP-libc-malloc-clone-2 branch from 2779336 to bb7d57a Compare June 11, 2024 00:46
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
@PiJoules
PiJoules force-pushed the WIP-libc-malloc-clone-2 branch from 843ea00 to 32ae283 Compare June 13, 2024 21:59
@PiJoules PiJoules closed this Mar 22, 2026
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