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

Add Page Memory to malloc/realloc and add free logic #532

Merged
merged 3 commits into from
Oct 16, 2017

Conversation

brianjohnson5972
Copy link
Contributor

@brianjohnson5972 brianjohnson5972 commented Oct 2, 2017

#129
Refactored to add 64K page memory as new heaps for allocating. If new page memory is adjacent to an existing heap, then the heap is expanded to limit fragmentation of the memory.

Free logic was also added. Free memory is just tracked by using the highest bit in the ptr header. So free processing costs very little at time of calling free at the cost of searching when the freed memory is required (after 1M of memory has been allocated). Also, this implementation helps to not have reserve extra memory to maintain a separate list and the logic to manage those list (like allocating it at the end of a heap and growing backwards and preventing memory collisions).

@bytemaster
Copy link
Contributor

Please resolve conflicts.

@brianjohnson5972
Copy link
Contributor Author

Conflict is resolved

@bytemaster
Copy link
Contributor

Conflicts created again.... please resolve.

@bytemaster bytemaster merged commit fd38d22 into EOSIO:master Oct 16, 2017
@brianjohnson5972 brianjohnson5972 deleted the 129_incorp_add_mem_pages branch November 27, 2017 14:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants