Commit Graph

73 Commits

Author SHA1 Message Date
Andreas Rumpf
e5cb1a2dd5 newSeqOfCap: skip initialization step for non-GC-ed data 2017-09-24 01:22:48 +02:00
Jacek Sieka
22684370b0 remove ArrayDummySize with unchecked arrays (#5818) 2017-08-28 15:44:35 +02:00
Araq
6b3af6a5d7 WIP: --gc:regions instead of --gc:stack 2017-08-13 02:51:00 +02:00
Andreas Rumpf
88b65ea957 fixes #6234 2017-08-11 20:14:44 +02:00
Ștefan Talpalaru
0c8c878f5a support libgo from GCC 6.3 (#5964) 2017-06-08 09:53:35 +02:00
Yuriy Glukhov
2ad8e073d8 Control leakDetector from cmdline 2016-12-06 11:54:47 +02:00
cheatfate
f0ea9447ce Add define value nimBurnFree which allow deallocation procedures to fill memory with 0xFF before freeing it. 2016-09-20 17:34:36 +03:00
Andreas Rumpf
b7c1be03c8 added system.newSeqOfCap for improved efficiency 2016-07-15 17:04:14 +02:00
Jacek Sieka
64b0485207 fix types of ansi_c/sysio to more closely match C ABI
also fixes some instances of using C library functions when there are
nim alternatives available
2016-06-05 12:03:20 +08:00
Jacek Sieka
ba1a52614b Merge remote-tracking branch 'origin/devel' into malloc-store-size 2016-04-26 21:25:57 +08:00
Andreas Rumpf
79f64d2469 simple stuff works with --gc:stack 2016-04-18 11:40:06 +02:00
Andreas Rumpf
e2c8d9ade0 beginnings of --gc:stack 2016-03-28 02:26:38 +02:00
Jacek Sieka
25f9330928 store block size in when using malloc and nogc
this allows for a correct implementation of realloc, which is needed as
code using it assumes new values will be zeroed out / nil
2016-03-25 20:54:01 +08:00
Jacek Sieka
9928b9f48d newObj can clear memory, even when using malloc and nogc 2016-03-07 22:38:22 +08:00
Andreas Rumpf
8ec5c01cae further progress on --gc:v2 2016-02-17 14:52:02 +01:00
Andreas Rumpf
19677a11b0 some progress on GC v2 2016-02-03 17:42:10 +01:00
Araq
076b809677 set debug switch to false again 2015-12-01 00:53:30 +01:00
Araq
10530add48 next steps for the GC 2015-12-01 00:53:30 +01:00
Reimer Behrends
250375bdd2 Remove spurious unsigned operations from system/threads.nim.
These operations were included before the unsigned module was
incorporated directly into system.nim and subsequently caused
compilation errors with --gc:go due to duplicate definitions.
2015-09-08 19:12:01 +02:00
Reimer Behrends
639b5e0069 Properly register threads with the Boehm GC.
In order to be able to scan thread stacks, the Boehm GC needs to know
about newly created threads. We establish the end of the stack by using
GC_call_with_stack_base (this works properly also with the dual-stack
Itanium architecture) and then GC_register_my_thread() to register a
thrad and GC_unregister_my_thread() to unregister it again.

This patch also includes a modification for the refc and markandsweep
collectors to set the stack bottom for thread stacks correctly even if
an optimizer aggressively inlines and optimizes procedures (this is
already being done for the stack of the main thread).

Finally, we use the {.noconv.} pragma for the Boehm GC, as the Boehm
API uses no specific calling convention.
2015-09-08 19:01:06 +02:00
Reimer Behrends
4baaea5ad5 Properly initialize the Boehm GC on all platforms. 2015-09-06 01:48:31 +02:00
Araq
a1caef474b proper distinction between --gc:none and --os:standalone 2015-06-29 02:48:33 +02:00
Stefan Talpalaru
8624654c57 TMemRegion -> MemRegion 2015-06-15 09:18:44 +02:00
Stefan Talpalaru
fe0b6d74f5 cleanup 2015-06-15 08:56:07 +02:00
Stefan Talpalaru
bdac85f2cf Merge branch 'devel' into gogc 2015-06-15 08:44:02 +02:00
Stefan Talpalaru
657d6f9de2 finalizer support 2015-06-15 08:36:55 +02:00
pdw
2ca90a20a1 lib/system/g-w - Dropped 'T' from types 2015-06-04 13:18:37 +02:00
Stefan Talpalaru
50e96ad939 the Go GC - initial implementation 2015-05-31 19:07:44 +02:00
Sergey Avseyev
1001fd2166 Fix Boehm GC on linux
Motivation
----------
Some linuxes (like Fedora) actually multiarch. And it means that
libgc.so.1 not always installed into /usr/lib. It is better to entrust
this job to ld and system configuration for it.

Modification
------------
Use relative path for Boehm GC on 'other' OS (and linux in particular)

Result
------
It is possible now to build nim with --gc:boehm on linux
2015-05-26 08:40:51 +03:00
def
22b4e4c2f2 Use more Natural and Positive numbers in proc parameters
- Didn't go through all modules, only the main ones I thought of
- Building the compiler and tests still work
2015-04-06 02:24:17 +02:00
Araq
ee57bb3e3e fixes --gc:none regression; made some tests green 2015-03-10 12:32:47 +01:00
def
2399f3b03d Some GC renames to get rid of deprecation warnings 2015-01-06 01:28:43 +01:00
Dominik Picheta
082bcb070f Fix --gc:none with --cs:partial. 2014-09-19 15:17:34 +01:00
Araq
4800acf6ab Merge branch 'devel' of https://github.com/Araq/Nimrod into bigbreak 2014-09-19 01:55:22 +02:00
Reimer Behrends
b11493585c Various fixes to how the Boehm GC's interface.
The Boehm GC interface did not define the getXXXSharedMem() functions
that were needed for compilation with --threads:on. It also used
`ppointer` instead of `PPointer`, so it failed to compile with
--cs:partial.
2014-09-18 18:46:23 +02:00
Araq
6d40288bb8 renamed Byte to byte 2014-08-29 00:56:34 +02:00
Araq
dbf9117c56 the big renamefest: first steps 2014-08-22 23:54:26 +02:00
Araq
42a8ab34f1 preparations for easier debugging 2014-04-07 23:28:29 +02:00
Araq
15859d94ec compiler warns when you use GC'ed memory and '--gc:none' 2014-01-19 20:24:44 +01:00
Araq
92b8fac94a case consistency part 4 2013-12-27 23:10:36 +01:00
Araq
132b6b3efe implemented 'injectStmt'; more debug support 2013-12-16 22:26:17 +01:00
Araq
f73cec7f01 GC: even more stress testing 2013-10-31 22:32:27 +01:00
Araq
1a792d46d0 first version of the debug GC; doesn't work yet 2013-10-01 08:44:09 +02:00
Grzegorz Adam Hankiewicz
72a3e21f28 Removes executable bit for text files. 2013-03-16 23:53:07 +01:00
Araq
5d119f61d1 preparations for a generational GC 2013-02-16 22:53:35 +01:00
Araq
ab6f793408 first version of a simple mark&sweep GC; activate with --gc:markAndSweep 2013-02-07 01:57:10 +01:00
Araq
65fdd641a9 revert to old GC; use --gc:v2 to activate the new GC 2013-01-31 17:24:55 +01:00
Zahary Karadjov
86bf97a730 cleaned up some debugging code 2013-01-20 21:22:07 +02:00
Zahary Karadjov
083d4f4708 fixes the recently discovered GC memory leaks
This revision is intended as comparison point between the old and the new GC
The used GC can be switched in mmdisp and various statistics will be gathered during
execution (these will be removed/disabled in later revisions)
2012-12-20 15:51:21 +02:00
Zahary Karadjov
c67520a7c5 temporary debugging code for the memory leak investigation 2012-11-28 01:15:14 +02:00