I recently made a new friend. His name is expand , and we had pleasant conversations, and I even met him several times. But when I started asking, no one heard of my “expander”. I became suspicious. I called several completely non-metaphorical friends at microsoft and several friends elsewhere in the business. Nothing. No one has ever used it. I have feasted on various search engines and tree sources. Nothing but a cursory mention here and there. Of course, there is not enough performance and compatibility information for me to introduce _expand into production code or, more appropriate, shared libraries.
Worse, there is no equivalent function that I can find in any of the gnu libraries, so anything I crack with my new friend will by no means be portable. What a shame, because it is truly an exciting and exciting ability to have. Of course, I could dig into realloc and figure out how it works, but the problem is that most of the implementation is heavily changed to * nixes. So I would have to use the version of the code after the version to try to get portable _expand. However, it seems ridiculous that nothing of the kind exists in glib or extended gnu libs.
- Is there a similar function I should know about hacking linux? Mostly answered
- Is there a standard hook on which I could build a similar function? Answered
- Does anyone know what kind of performance _expand offers?
- How does it interact with objects allocated on LFH?
To clarify my interests, I'm trying to create a separately connected drive that expands, trying to minimize fragmentation when distributing blocks with multiple elements in accordance with traditional deque implementations. By limiting the use cases for adding and removing elements, I hope to optimize the time for removal for the entire structure, as well as insert and index elements. As a result, the “loud crash” _expand allows me to make the structure reasonably think about when and if it can resize in place, and what it means about where it can put data.
c ++ memory-management malloc
Jake kurzer
source share