| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
allocShared0. (#13190)
* Cleanup, remove lib/system/allocators.nim. seqs_v2 and strs_v2 now use
allocShared0 by default.
* Fixed -d:useMalloc allocShared / reallocShared / deallocShared. These now use the alloc/dealloc/realloc implementation that also takes care of zeroing memory at realloc.
* Removed debug printfs
* Removed unpairedEnvAllocs() from tests/destructor/tnewruntime_misc
* More mmdisp cleanups. The shared allocators do not need to zero memory or throw since the regular ones already do that
* Introduced realloc0 and reallocShared0, these procs are now used by
strs_v2 and seqs_v2. This also allowed the -d:useMalloc allocator to
drop the extra header with allocation length.
* Moved strs_v2/seqs_v2 'allocated' flag into 'cap' field
* Added 'getAllocStats()' to get low level alloc/dealloc counters. Enable with -d:allocStats
* *allocShared implementations for boehm and go allocators now depend on the proper *allocImpl procs
|
|
|
|
|
|
|
|
| |
* os:any implementation
* os:asny: omit flock/funlock calls in echoBinSafe
* Disabled default "unhandled expection" reporting for `--os:any` to reduce
code size. Added unhandledExceptionHook instead which can be used to get
a notification from Nim and handle it from the application.
|
|
|
|
| |
-d:StandaloneHeapSize (#13077)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* first implementation of the =trace and =dispose hooks for the cycle collector
* a cycle collector for ARC: progress
* manual: the .acyclic pragma is a thing once again
* gcbench: adaptations for --gc:arc
* enable valgrind tests for the strutils tests
* testament: better valgrind support
* ARC refactoring: growable jumpstacks
* ARC cycle detector: non-recursive algorithm
* moved and renamed core/ files back to system/
* refactoring: --gc:arc vs --gc:orc since 'orc' is even more experimental and we want to ship --gc:arc soonish
|
| |
|
| |
|
|
|
|
| |
(#12406) [backport]
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Boehm GC only needs interior pointer checking if pointers in global
variables or on the heap point to the interior of an object rather than
the beginning. If this does not happen, then checking for interior
pointers causes additional overhead, in particular because any objects
whose sizes are an exact multiple of two words gain another two words of
padding, wasting memory.
If checking of interior pointers is still desired, this can be achieved
by setting the environment variable GC_ALL_INTERIOR_POINTERS.
Pointers on the stack will always be treated as potential interior
pointers, as compiler optimizations may advance the only live reference
to a point past the beginning of an object.
|
|
|
|
|
|
|
|
|
| |
* 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)
|
| |
|
|
|
|
|
|
|
|
| |
- Go's write barriers are now plugged-in in all the relevant points
- "gcGo" is correctly classified by usesWriteBarrier()
- some gogc structures and functions now use golib wrappers to keep GCC
version-specific conditions out of the compiler/stdlib code
- we no longer allow mixing the C malloc with Go's
- fix a problem with string copying
|
| |
|
| |
|
|
|
|
|
| |
underallocating for sequences of any type larger than 1 byte. This does the
necessary multiply to restore basic functionality.
|
| |
|
| |
|
|
|
|
| |
From the man page: "Unlike the standard implementations of malloc, GC_malloc
clears the newly allocated storage. GC_malloc_atomic does not."
|
| |
|
| |
|
|
|
|
| |
__go_free() was removed from gcc-7.2.0 so we stop trying to help the
garbage collector by marking no longer used memory regions
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
memory with 0xFF before freeing it.
|
| |
|
|
|
|
|
| |
also fixes some instances of using C library functions when there are
nim alternatives available
|
|\ |
|
| | |
|
| | |
|
|/
|
|
|
| |
this allows for a correct implementation of realloc, which is needed as
code using it assumes new values will be zeroed out / nil
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|