Is there a way to pre-reserve a memory block? I mean, I'm going to fetch 512 MiB of memory as a private heap, use it until it's full, and then the application will access the common heap. Is that possible? And if so, how?
Quote from: diogenes on April 02, 2018, 09:36:37 amIs there a way to pre-reserve a memory block? I mean, I'm going to fetch 512 MiB of memory as a private heap, use it until it's full, and then the application will access the common heap. Is that possible? And if so, how?Yes there is: your classes need to override Tobject.NewInstance / TObject.FreeInstance https://www.freepascal.org/docs-html/rtl/system/tobject.newinstance.htmlIf you know the size, you can pool memory that way.... (not noobs, but experienced programmers).And taazz: there is no limit on that.....except virtual available memory.It can also be much faster in certain scenario's.
I never claimed there is a limit I only said the existing manager does not cache memory on 512MB increments.