daniel
0c3a2a257d
* Convert heap to ptruint.
...
git-svn-id: trunk@7950 -
2007-07-04 19:46:47 +00:00
micha
b8822c88b5
* fix heap manager adding to wrong free list, and race condition
...
git-svn-id: trunk@7878 -
2007-06-30 21:13:48 +00:00
micha
cd1a283a18
* fix heap var size chunk search to be as intended (search constant number of blocks from best, not from any bigger)
...
git-svn-id: trunk@7807 -
2007-06-24 21:50:05 +00:00
micha
afb5f32f65
* fix heap block recycle flag when orphaning
...
git-svn-id: trunk@7805 -
2007-06-24 21:32:31 +00:00
micha
787f9a44c7
* heap manager: do not try to leave critical section twice, moron
...
git-svn-id: trunk@7763 -
2007-06-21 20:19:33 +00:00
micha
c0fa8fd255
* heap manager: fix thread exit race condition by using single global lock
...
fix finishing to be freed list in orphaned list context
fix heaptrace finalization
git-svn-id: trunk@7752 -
2007-06-20 21:10:35 +00:00
micha
c226f6fd44
* heap manager: handle freeing of block owned by exited thread
...
* heap trace: ditto
git-svn-id: trunk@7649 -
2007-06-13 20:27:42 +00:00
Jonas Maebe
20b99dade3
- reverted r7600, see additional comments in mantis #9027
...
git-svn-id: trunk@7606 -
2007-06-09 17:14:28 +00:00
Jonas Maebe
5a8679131f
+ support for new/dispose with extra size parameter in macpas mode
...
(mantis #9027 )
git-svn-id: trunk@7600 -
2007-06-08 18:02:31 +00:00
micha
f3a22cbab4
* simplify/remove some code
...
git-svn-id: trunk@7533 -
2007-05-30 19:05:07 +00:00
micha
eaa598094e
* heap manager: do not access chunk after last one
...
git-svn-id: trunk@7497 -
2007-05-28 15:06:19 +00:00
micha
0248d2472d
* heap manager: fix os chunk list nonsense
...
fix usage statistics for variable sized chunks
fix var chunks free space fragmentation
git-svn-id: trunk@7491 -
2007-05-27 19:04:02 +00:00
micha
f9d2ea7e3a
* heap manager: fix shrinking var sized chunks to very small sizes < sizeof(tmemchunk_var)
...
was no problem previously due to sizeof(tmemchunk_var) <= blocksize
git-svn-id: trunk@7464 -
2007-05-25 07:05:33 +00:00
micha
9f11556f10
* flush output after heap debug writeln at exit
...
git-svn-id: trunk@7413 -
2007-05-21 20:38:29 +00:00
micha
6c85fcb157
heap manager: initialize critical sections properly
...
git-svn-id: trunk@7412 -
2007-05-21 17:08:28 +00:00
micha
7f2a257102
+ heap manager now per thread, reduce heap lock contention
...
+ heap threading test
git-svn-id: trunk@7407 -
2007-05-20 20:58:12 +00:00
micha
bb9de8f193
* SHOW_MEM_USAGE define to always show maximum heap size used/allocated, independent of DUMP_MEM_USAGE
...
git-svn-id: trunk@7324 -
2007-05-13 12:34:16 +00:00
micha
4579c242df
* heap manager: look for better matching variable block size, with upperbound search
...
git-svn-id: trunk@7320 -
2007-05-12 20:52:08 +00:00
micha
aa951460a5
+ heap manager size statistics
...
git-svn-id: trunk@7319 -
2007-05-12 20:50:33 +00:00
micha
09a60a4019
* tiny optimization to heap manager: implement freeoslist as a fifo (instead of lifo) which should allow more os chunks to keep their fixed size formatting in case of diverse fixed size usage
...
git-svn-id: trunk@7237 -
2007-05-02 05:20:44 +00:00
micha
9c727d1762
* tiny optimization to heap manager, avoid repeated removing/readding to freeoslist overhead
...
git-svn-id: trunk@7236 -
2007-05-01 21:04:18 +00:00
micha
e30a47723b
* heap manager micro optimizations
...
git-svn-id: trunk@7219 -
2007-04-30 20:23:46 +00:00
micha
9bdde01a99
* avoid usage of freelists_free_chunk boolean, while still prevent repeated fixed size conversion overhead; should reduce memory usage in some cases
...
git-svn-id: trunk@7203 -
2007-04-30 12:52:28 +00:00
yury
3c10856a4f
* Dont throw runerrors in default MemoryMutexManager if HAS_MT_MEMORYMANAGER is defined.
...
git-svn-id: trunk@5962 -
2007-01-14 01:14:12 +00:00
Legolas
9e6d19a494
* rtl part of first Nintendo DS port
...
git-svn-id: trunk@5593 -
2006-12-14 17:34:51 +00:00
Jonas Maebe
64b7f00afd
* fixed ReturnNilIfGrowHeapFails
...
git-svn-id: trunk@5042 -
2006-10-28 18:17:34 +00:00
micha
dc3b37ff73
+ heap manager: reduce overhead on fixed size chunks from 8 to 4
...
git-svn-id: trunk@4904 -
2006-10-14 15:05:24 +00:00
Legolas
19d597f425
* Reactivated heap management for GBA
...
git-svn-id: trunk@4529 -
2006-09-01 17:54:59 +00:00
florian
d337c3ca6a
* clean up heap at exit, fixes #7183
...
git-svn-id: trunk@4410 -
2006-08-11 22:09:29 +00:00
peter
b3732f7215
* keep same fixed block, also if we resize to a smaller size.
...
git-svn-id: trunk@4313 -
2006-07-30 15:02:28 +00:00
yury
e062922528
* added an option to use target-specific memory manager instead of standard. This is controlled by HAS_MEMORYMANAGER and HAS_MT_MEMORYMANAGER defines.
...
* wince executables use C memory manager now (as all apps compiled by eVC++). It saves 5.5 KB of exe size.
git-svn-id: trunk@4282 -
2006-07-23 10:23:31 +00:00
florian
5575a837db
* gba patch from Francesco Lombardi
...
git-svn-id: trunk@3716 -
2006-05-28 14:48:24 +00:00
peter
4b7f51b0aa
* fixed uninitialized var
...
git-svn-id: trunk@2654 -
2006-02-20 11:24:38 +00:00
florian
0cc2b9b16b
* small speed improvements
...
git-svn-id: trunk@2633 -
2006-02-19 16:59:03 +00:00
florian
a9198b7300
* ensure always 16 byte aligned memory blocks
...
git-svn-id: trunk@2511 -
2006-02-10 19:08:43 +00:00
peter
9d817056ce
* optimize by removing expensive calculations
...
git-svn-id: trunk@1973 -
2005-12-16 17:19:37 +00:00
florian
e2a4dac215
+ i386 assembler versions of decr_ansistring and unique_ansistring
...
git-svn-id: trunk@1963 -
2005-12-15 19:51:57 +00:00
Jonas Maebe
31b173fe85
* always keep 1 free os chunk available in the freelist to avoid
...
a performance killing corner case where one block is constantly allocated
and freed and can result in a redividing of an os chunk in small parts
for each allocation
git-svn-id: trunk@1900 -
2005-12-07 20:01:15 +00:00
peter
f9f75b40e5
* fixed DUMPGROW compile
...
git-svn-id: trunk@1305 -
2005-10-06 05:57:58 +00:00
florian
4e6b371dc5
* patch from Martin Schreiber to fix bug #4247
...
git-svn-id: trunk@784 -
2005-08-03 19:55:06 +00:00
peter
1cecfcc09f
* only all resizes for fixed blocks when the blocksize doesn't
...
change.
* check the new size first if it fits in the fixed size range
to prevent truncation of the size when the fixedsizemask is applied
git-svn-id: trunk@636 -
2005-07-16 20:17:24 +00:00
peter
822f7f0f16
* allow freemem nil
...
git-svn-id: trunk@499 -
2005-06-25 21:11:16 +00:00
michael
fccc19aa5c
+ Removed HASGETHEAPSTATUS HASGETFPCHEAPSTATUS defines
...
git-svn-id: trunk@311 -
2005-06-09 18:04:47 +00:00
michael
a775d3d487
+ Removed HASCURRENCY VALUEGETMEM VALUEFREEMEM defines
...
git-svn-id: trunk@293 -
2005-06-09 17:33:22 +00:00
peter
4ace790492
* remove $Log
...
git-svn-id: trunk@231 -
2005-06-07 09:47:55 +00:00
florian
0d7aaab6b8
* patch from Ales Katona making the memory manager more
...
smart when releasing memory chunks back to the OS
git-svn-id: trunk@190 -
2005-06-04 10:53:38 +00:00
fpc
790a4fe2d3
* log and id tags removed
...
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3
initial import
...
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
fc977d3259
* check if there is enough room before concatting blocks in
...
systryresizemem()
2005-04-04 15:40:30 +00:00
Jonas Maebe
2426ecafc3
* fixed several warnings and notes about unused variables (mainly) or
...
uninitialised use of variables/function results (a few)
2005-03-25 22:53:39 +00:00
peter
ccf36c0afd
* fix crash under win32 with previous reallocmem fix
2005-03-21 16:31:33 +00:00
peter
d7ae60a9e0
* fixed tryresizemem
2005-03-20 18:57:29 +00:00
peter
617bd39762
* fix getheapstatus bootstrapping
2005-03-04 16:49:34 +00:00
marco
28011bbfb0
* small typo fix on last commit
2005-03-02 14:25:19 +00:00
marco
190bd1ab34
* getfpcheapstatus now also on memmgr
2005-03-02 10:46:10 +00:00
marco
daf59fbd7e
* getFPCheapstatus (no, FPC HEAP, not FP CHEAP!)
2005-02-28 15:38:38 +00:00
peter
e417e34496
* truncate log
2005-02-14 17:13:06 +00:00
peter
2d1aee8e53
* allow Freemem(nil)
2005-01-30 11:56:29 +00:00
peter
2e52bf2824
* fixed overflow when reusing a memory block for fixed size chunks
2004-12-19 13:45:56 +00:00
peter
dac91ff361
* fix currheapused
2004-11-26 22:22:58 +00:00
peter
c38daf68eb
* typo for GetHeapStatus
2004-11-22 22:26:21 +00:00
peter
a263b1d40e
* GetHeapStatus added, removed MaxAvail,MemAvail,HeapSize
2004-11-22 19:34:58 +00:00
peter
869b0ecc85
* compiler defined HEAP and HEAPSIZE removed
2004-10-25 15:38:59 +00:00
Jonas Maebe
6840bd8ece
* changed formatting to conform to the rest of the compiler/rtl
...
* fixed SysMaxAvail so it also looks at the free fixed size blocks
2004-08-10 18:58:36 +00:00
peter
cd35d3fd5e
* readded support for ReturnIfGrowHeapFails
2004-06-29 20:50:32 +00:00
florian
1397425c4a
* fixed heap corruption on sparc
2004-06-27 19:47:27 +00:00
florian
8f6f6bfc30
* finally (hopefully) fixed sysalloc trouble
2004-06-27 11:57:18 +00:00
peter
58d5c20352
* moved padding for sparc
2004-06-18 14:40:55 +00:00
peter
2ed14823c5
* New heapmanager that releases memory back to the OS, donated
...
by Micha Nelissen
2004-06-17 16:16:13 +00:00
peter
b3eb8fb2af
* sparc needs alignment on 8 bytes to allow doubles
2004-05-31 12:18:16 +00:00
peter
482e1a2505
* 64bit fixes
2004-04-26 16:20:54 +00:00
peter
abfc396c40
* cmem moved to rtl
...
* longint replaced with ptrint in heapmanagers
2004-03-15 21:48:26 +00:00
peter
6219d43b43
* exit with rte 204 instead of looping infinite when a heap record
...
size is overwritten with 0
2004-03-15 20:42:39 +00:00
Jonas Maebe
456eb6eca0
* improved beforeheapend inheritance (remove flag again when possible,
...
sometimes resulting in more opportunities for TryConcatFreeRecord)
2004-01-29 22:45:25 +00:00
daniel
d9b98b35be
* Small microoptimization
2003-12-15 21:39:16 +00:00
marco
fcde2c3ffa
* *memORY overloads
2003-10-02 14:03:24 +00:00
peter
36fd13c639
* fixed wrong check when allocation of a block > 1mb failed
2003-09-28 12:43:48 +00:00
peter
3d8d9c96f8
* sbrk returns pointer
2003-09-27 11:52:35 +00:00
peter
1ddaa693a3
* check newpos < 0 instead of = -1
2003-05-23 14:53:48 +00:00
florian
eab5d1f7c5
* started to make the rtl 64 bit save by introducing SizeInt and SizeUInt (similar to size_t of C)
2003-05-01 08:05:23 +00:00
peter
d5896e54f2
* fix setmemorymutexmanager to call mutexdone on the already
...
installed manager instead of the passed manager
2002-11-01 17:38:04 +00:00
peter
ca3679e4bf
* MemoryManager record has a field NeedLock if the wrapper functions
...
need to provide locking for multithreaded programs
2002-10-30 20:39:13 +00:00
peter
766e8d35f6
* remove wrong lock from SysMemSize, MemSize() does the locking
...
already.
2002-10-30 19:54:19 +00:00
peter
5fff238567
* threads unit added for thread support
2002-10-14 19:39:16 +00:00
peter
01dfac4a4e
* old logs removed and tabs fixed
2002-09-07 15:06:34 +00:00
Jonas Maebe
ee56b2e0ec
* heap manager now fragments the heap much less
2002-06-17 08:33:04 +00:00
peter
90ff7a6db8
* fpc_freemem and fpc_getmem compilerproc
2002-04-21 18:56:59 +00:00
carl
dbfaa38c6e
* fixed some missing IsMultiThreaded variables
2002-02-10 15:33:45 +00:00
Jonas Maebe
e52fa07468
* fix for web bug #1727 from Peter (corrected)
2002-01-02 13:43:09 +00:00
Jonas Maebe
d06ebc3fd1
* fix for web bug #1727 from Peter
2001-12-31 11:41:06 +00:00
peter
7484da248d
* freemem(var) -> freemem(value)
2001-12-03 21:39:19 +00:00
peter
52d1571d12
* moved locking of heap
2001-10-25 21:22:34 +00:00
peter
5d62342562
* criticalsection renamed to rtlcriticalsection for kylix compatibility
2001-10-23 21:51:02 +00:00
Jonas Maebe
cbc6756190
* fixed wrong typed constant procvars in preparation of my fix which will
...
disallow them in FPC mode (plus some other unmerged changes since
LAST_MERGE)
2001-06-06 17:20:21 +00:00
florian
ddd5f168eb
+ more MT stuff added
2001-01-24 21:47:18 +00:00
peter
1a0277d7b0
* smallatheapptr undef and other cleanup (merged)
2000-08-08 19:22:46 +00:00
michael
586c4cea50
+ Conditionals fixed
2000-07-14 10:33:09 +00:00
michael
650fbb86aa
+ removed logs
2000-07-13 11:32:24 +00:00
michael
e7aca136a1
+ Initial import
2000-07-13 06:29:38 +00:00
pierre
e574245b0e
fix for heap problem
2000-04-20 15:29:15 +00:00