Skip to content
Snippets Groups Projects

Add correct offset for end of chunk

Merged Ansgar Burchardt requested to merge bugfix/poolallocator-debug into master

Using &current->chunk_ + x will add x * sizeof(current->chunk_) to the pointer, but we only want to add x.

Adding a much larger number still "works" on 64bit systems (although it does not perform the intended check). However on 32bit platforms this wraps (at least in the way used by sllisttest.cc) and the "end" of the chunk is suddenly before the beginning.

Closes #57 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading