Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » GetMemoryBlockSize, TryRealloc
GetMemoryBlockSize, TryRealloc [message #44212] Mon, 26 January 2015 20:25
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Heap API is now enhanced by two new functions:

size_t GetMemoryBlockSize(void *ptr);

- returns the 'real' writable size for any block. Note that in debug mode, this is equal to required size during MemoryAlloc (because of block debug info), but might be bigger than that in release mode.

bool TryRealloc(void *ptr, size_t newsize);

- attempts to increase the size of block. This only can be successful in release mode (in debug, always returns false). For very large and small blocks, this can succeed only if the real size of block is larger than requested one, but for medium blocks (~2KB-50KB) this can actually use next adjacent memory block if it is free...
Previous Topic: New builders features
Next Topic: LineEdit/CodeEditor heavily optimized for huge files
Goto Forum:
  


Current Time: Fri Apr 19 18:37:13 CEST 2024

Total time taken to generate the page: 0.03337 seconds