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

untested and unreviewed heap allocator #291

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

untested and unreviewed heap allocator #291

wants to merge 3 commits into from

Conversation

trufae
Copy link
Collaborator

@trufae trufae commented Feb 28, 2025

Checklist

  • Closing issues: #issue
  • Mark this if you consider it ready to merge
  • I've added tests (optional)
  • I wrote some documentation

Description

// Get size of the free list item.
static inline int getSize(void *ptr) {
return ((Header *)remove_offset (ptr))->size;
static inline int getBlockSize(void *payload_ptr) {

Check notice

Code scanning / CodeQL

Unused static function Note

Static function getBlockSize is unreachable
// Coalesce with adjacent free blocks if possible
// Coalesce backward
Header *current_header = header;
//bool merged_prev = false;

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
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