Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I was recently assigned a project and I'm looking for a little advice.
I have to implement a memory manager that has a char array for a memory pool.
So what I have concepted out was to segment the pool up into variable sized chunks, using the begining of the mempool to hold the location of the chunks as well as if they are being used.
I think its a fairly good solution as the conditions are that no other static or global variable may be created (the reason I went with this route was the hint that if we need to save data, we need to make it fit in the pool)
In any case on to my questions...
1)Anyone have any experience with variable pools, and would this approach theoretically work? I wouldnt want to get a day or two into it and hit a major design flaw that requires scrapping the whole project.
2)Can a character array store addresses of other portions of the same array, if so, can you offer some suggested reading on how to go about doing so (syntax-wise)?
Any advice would be greatly appreciated!!
0 · ·