Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Commit

Permalink
fix: Override RAM certaines fois
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainTHD committed Oct 2, 2020
1 parent 5b3b5e9 commit f7eba65
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/memory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,14 @@ namespace std::memory {
currentMemorySegment->nextFreeSegment->prevFreeSegment = currentMemorySegment->prevFreeSegment;
}

if (currentMemorySegment->prevSegment != nullptr) {
currentMemorySegment->prevSegment->nextFreeSegment = currentMemorySegment->nextFreeSegment;
}

if (currentMemorySegment->nextSegment != nullptr) {
currentMemorySegment->nextSegment->prevFreeSegment = currentMemorySegment->prevFreeSegment;
}

return currentMemorySegment + 1;
}

Expand Down

0 comments on commit f7eba65

Please sign in to comment.