Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed bugs in Memory-Management

  • Loading branch information...
commit 1205081ed69bd16db46787f16c72615f396b6070 1 parent 6485880
@Wolfy42 authored
View
3  BOSS-Common/Messaging/MemoryManager/MemoryManager.cpp
@@ -68,6 +68,7 @@ void MemoryManager::remove(Message* message, bool isVirtual) {
address MemoryManager::getNextFreeAddressWith(int size) {
+ int sizeBefore;
MemoryHeader* mh = (MemoryHeader*)_memoryStartAddress;
while (!hasEnoughSpaceFor(size, mh)) {
mh = getNextHeader(mh);
@@ -80,9 +81,7 @@ address MemoryManager::getNextFreeAddressWith(int size) {
end->memoryState = BOSS_MEMORY_FREE;
end->size = 0;
}
- new ((void*)mh) MemoryHeader();
mh->memoryState = BOSS_MEMORY_RESERVED;
- mh->size = size;
return (address) ((int)mh + sizeof(MemoryHeader));
}
View
2  BOSS-Common/Messaging/Message/Message.h
@@ -15,8 +15,6 @@ class Message {
int getTaskId();
int getParamsLength();
int* getParams();
-
- void addPointerAddressOffset(int virtualOffset);
};
#endif /* MESSAGE_H_ */
Please sign in to comment.
Something went wrong with that request. Please try again.