summary refs log tree commit diff stats
path: root/lib/system/gc_ms.nim
Commit message (Collapse)AuthorAgeFilesLines
* complete std prefixes for stdlib (#22887)ringabout2023-10-301-1/+1
| | | | follow up https://github.com/nim-lang/Nim/pull/22851 follow up https://github.com/nim-lang/Nim/pull/22873
* fix #12122 (#21096)Bung2022-12-161-9/+9
|
* ref #20694; quit value gets saturated to ranges (#20753)ringabout2022-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | | * quit value gets saturated to ranges * add documentation * minimal changes * refactor * small fix * add documentation * fixes * Update lib/system.nim Co-authored-by: Juan Carlos <juancarlospaco@gmail.com> Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
* Removes deprecated {.injectStmt.}. Fixes #18666 (#18984)Dominik Picheta2021-10-131-10/+0
|
* move {.injectStmt.} to experimental; add a test (#18300)Timothee Cour2021-06-201-0/+1
| | | | | * move {.injectStmt.} to experimental; add a test * undocument and deprecat `.injectStmt` but keep its implementation until we have a replacement
* Remove the use of usrToCell in gcMark [backport:1.2] (#17709)zah2021-04-141-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove the use of usrToCell in gcMark [backport:1.2] Recently, we've discovered a GC crash resulting from inlining of the memory allocation procs that allowed the compiler to avoid maintaining any references to the "user pointer" on the stack. Instead, a "cell pointer" appeared there and all field accesses were performed with adjusted offsets. This interfered with the ability of the GC to mark the correct cell in the conservative stack scans which lead to premature collection of objects. More details here: https://github.com/status-im/Nim/commit/af69b3ceae16281efd45cbee4ce1bedd14282304 This commit closes another theoretical loophole that may lead to the same problem. If a short proc is accessing both the object and its reference count in a short sequence of instructions, the compiler may be enticed to reduce the number of registers being used by storing only a single pointer to the object and using offsets when reading and writing fields. A perfectly good strategy would be to store only the cell pointer, so the reference count updates can be performed without applying offsets. Accessing the fields of the object requires offsets anyway, but these can be adjusted at compile-time without any loss. Following this strategy will lead to the same problem of marking a wrong cell during the conservative stack scan, leading to premature collection. The problem is avoided by not using `usrToCell` in `gcMark`. Since the cell discovery logic can already handle interior pointers, the user pointers don't need to be adjusted for the GC to function correctly.
* fixes #17647 (#17667)Andreas Rumpf2021-04-071-5/+5
|
* fix deprecated messages regarding high (#15832)flywind2020-11-031-1/+1
|
* specialize genericReset (#14398)Andreas Rumpf2020-05-191-1/+1
| | | | | | | * progress * make tests green * maybe we also want to reset pointers, dunno * progress * cleanup; fixes #13879 [backport:1.2]
* fixes #13881Andreas Rumpf2020-05-121-3/+4
| | | | | | * fixes #13881 * documented changed requirements for system.onThreadDestruction * destructors.rst: update the documentation
* Error -> Defect for defects (#13908)Jacek Sieka2020-04-281-1/+1
| | | | | | | | | | | | | | * Error -> Defect for defects The distinction between Error and Defect is subjective, context-dependent and somewhat arbitrary, so when looking at an exception, it's hard to guess what it is - this happens often when looking at a `raises` list _without_ opening the corresponding definition and digging through layers of inheritance. With the help of a little consistency in naming, it's at least possible to start disentangling the two error types and the standard lib can set a good example here.
* forward type alignment information to seqs (#12430)Arne Döring2020-04-191-7/+8
|
* catchable defects (#13626)Andreas Rumpf2020-03-121-2/+4
| | | | | | | | | | * allow defects to be caught even for --exceptions:goto (WIP) * implemented the new --panics:on|off switch; refs https://github.com/nim-lang/RFCs/issues/180 * new implementation for integer overflow checking * produce a warning if a user-defined exception type inherits from Exception directly * applied Timothee's suggestions; improved the documentation and replace the term 'checked runtime check' by 'panic' * fixes #13627 * don't inherit from Exception directly
* first implementation of the new --seqsv2 switchAraq2019-10-201-2/+2
|
* gc:destructors progressAraq2019-09-011-1/+1
|
* styleCheck: make the compiler and large parts of the stdlib compatible with ↵Araq2019-07-101-4/+4
| | | | --styleCheck:error
* gc: removed dead codeAndreas Rumpf2019-03-141-3/+0
|
* code cleanup: there is no tyOptRefAndreas Rumpf2019-02-221-4/+4
|
* system refactorings (#10559)Andreas Rumpf2019-02-061-1/+2
| | | | | | | | * move IO subsystem into its own module; refs #10385 * make standalone test compile again * make C++ examples compile again * make more tests green * make sysAssert and gcAssert work again
* fixes #10271 [backport]Araq2019-01-131-1/+2
|
* Remove dead code (#9777)Jacek Sieka2018-11-261-22/+2
| | | | | | | | | * gc/gc2: remove unused ref counting stuff * also removes some false threading support - hasSharedHeap is always false in gc/gc2 * gc: remove some threading cruft * remove asgnRefNoCycle * compiler: remove TLoc.dup (unused)
* more progress on destructor based stringsAndreas Rumpf2018-07-131-47/+49
|
* M&S GC: collect earlier under memory pressureAndreas Rumpf2018-01-301-6/+7
|
* M&S GC: minor code cleanupAndreas Rumpf2018-01-211-6/+0
|
* Mark&Sweep GC: introduce nimTracing define for debuggingAndreas Rumpf2018-01-191-1/+38
|
* GC: enable precise global/thread local storage tracingAraq2018-01-151-10/+5
|
* GC improvements; distinguish between thread local and globals in the marking ↵Araq2018-01-141-17/+6
| | | | step
* Fixed mutex usage in SharedList and SharedTable. Closes #6988 (#6990)Yuriy Glukhov2017-12-311-1/+1
|
* more replacements for the deprecated '<'Andreas Rumpf2017-10-291-2/+2
|
* GCs: use add instead of &Andreas Rumpf2017-09-291-3/+3
|
* first steps of making 'opt' a first class type for NimAndreas Rumpf2017-09-251-4/+4
|
* added system.deallocHeap feature for Nim's native GCsAndreas Rumpf2017-07-221-12/+0
|
* make the GCs more robustAndreas Rumpf2017-07-201-7/+7
|
* added logic to the M&S GC to detect logical leaksAraq2017-06-161-0/+55
|
* Cleanup of gc codeRokas Kupstys2017-02-201-14/+16
| | | | Cleanups
* system.nim: don't use deprecated symbols/constructsAraq2017-02-081-1/+1
|
* M&S GC gets the heap dump featureAndreas Rumpf2017-01-151-14/+17
|
* Add `import sharedlist` when `hasThreadSupport`James Boyden2016-04-051-0/+3
| | | | | | | | | | Without this change, a user's Nim code won't compile if they're using both threads & the mark-and-sweep GC: lib/system/gc_ms.nim(75, 18) Error: undeclared identifier: 'SharedList' toDispose: SharedList[pointer] ^ This small code block addition was copied from "lib/system/gc.nim" (where it appears directly after a `when defined(memProfiler)` block also).
* GCs support ForeignCellsAndreas Rumpf2016-03-051-0/+7
|
* fixes #3245Araq2015-08-251-1/+2
|
* Coroutine support for i386/amd64 platforms unix/windows OSes ↵rku2015-07-311-153/+23
| | | | markAndSweep/refCounting GCs.
* Fixes compilation with --gc:markandsweep.Dominik Picheta2015-06-041-1/+1
|
* lib/system/g-w - Dropped 'T' from typespdw2015-06-041-47/+48
|
* Fix GC scanning of registers on x86_64 architectures.Reimer Behrends2015-05-071-0/+9
| | | | | | | It is possible for jmp_buf to not be word-aligned or addresses in the register dump to not be word-aligned. This can result in either addresses in registers being missed or even addresses on the stack past the register area not being scanned properly.
* Fix proc call in gc_msdef2015-03-261-1/+1
| | | | This fixes compilation with --gc:markandsweep -d:gcUseBitvectors
* fixed the tester; more tests greenAraq2015-03-101-18/+22
|
* Fix typosFederico Ceratto2015-02-151-1/+1
|
* fixes #2070Araq2015-02-101-4/+6
|
* Happy new year!Guillaume Gelin2015-01-061-1/+1
|
* added 'setupGcForForeignThread' for better C interopAraq2014-12-111-0/+14
|