Questions tagged [boehm-gc]

A garbage collecting replacement for C's malloc() using a mark/sweep algorithm.

A tracing (mark/sweep) garbage collector. It periodically determines which objects can be reached by following pointers.

Began life (ca. 1980) as a simple GC for the Russell programming language.

Used among others by:

  • The runtime system for GCJ, the static GNU java compiler.
  • W3m, a text-based web browser.
  • Some versions of the Xerox DocuPrint printer software.
  • The Mozilla project, as leak detector.
  • The Mono project, an open source implementation of the .NET development framework.

Reference:

50 questions
1
vote
1 answer

Does Boehm GC recognize the stacks of Win32 Fibers as roots?

What differences are there in the handling of Threads vs Fibers in Boehm GC? Win32 CreateFiber only takes a desired stack size and allocates it without giving the user access to the stack pointer (as far as I can tell). Does Boehm GC recognize the…
1
vote
1 answer

Boehm GC android sigsegv on load_gc

I'm having an odd crash in Boehm on Android x86 (but arm works fine); It's crashing on: deferred = *(word *)limit; with: LogCat: I/DEBUG ( 6453): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xa31f8 It's always the same address…
Carlo Kok
  • 1,128
  • 5
  • 14
1
vote
0 answers

Garbage Collector : finalize isn't always called?

My question is related to Java finalize : How can I free non-GC resource even if there's mistake . The finalize is NOT always called in most Garbage Collectors? If so, Why not? and Is there any GC that guarantee call finalize before program is…
ikh
  • 10,119
  • 1
  • 31
  • 70
1
vote
1 answer

boehm-gc : finalizer, and shrink to fit heap

I have 2 questions about boehm-gc. When GC collects garbage-object, GC free memory without calling destructor although the object has destructor. I found GC calls "finailzer", but I don't know how to register it... How can I do? When GC collect…
ikh
  • 10,119
  • 1
  • 31
  • 70
1
vote
1 answer

How to use Boehm Garbage collector in Ubuntu 12.04

Consider the program: #include int main() { void* p = GC_MALLOC(15); } Under Ubuntu 10.04 LTS this compiles (gcc -lgc test.c). Under 12.04 LTS: /tmp/cc7GcTfU.o: In function `main': main.c:(.text+0xe): undefined reference to…
Max
  • 3,384
  • 2
  • 27
  • 26
0
votes
1 answer

How to modify a project Makefile to integrate boehm gc

Please, is someone familiar with Boehm GC? I want to use it in the word-count app of Phoenix (https://github.com/kozyraki/phoenix), but I fail to modify the Makefile to include the GC library. On the documentation page of Boehm, they only provide a…
S Bitchebe
  • 27
  • 3
0
votes
1 answer

Installing the Boehm GC on OS X

I want to install the Boehm garbage collector garbage collector on MacOS. I looked at this guide but it did not help; invoking brew install libgc did nothing. Here is my example code that I am trying to run: #include int main() { …
Caspian Ahlberg
  • 934
  • 10
  • 19
0
votes
0 answers

Using the GMP library with Boehm's Garbage Collector

So... I've set up Boehm's GC and want to make the GMP library use it. This is what I'm doing right now: //=================== // Definitions //=================== #include #define MALLOC(x) GC_malloc(x) #define…
Dr.Kameleon
  • 22,532
  • 20
  • 115
  • 223
0
votes
1 answer

Private API call not allowed in iOS (function "exc_server")

My iOS app (using the Boehm garbage collector) was rejected in the AppStore because of one private API function call. Here the offending function in file os_dep.c: /* These are not defined in any header, although they are documented */ extern…
user644348
  • 33
  • 3
0
votes
1 answer

Why things that are used inside openmp parallel blocks not collected by Boehm GC afterwards?

I am using Boehm-GC in my C program for garbage collection. I am trying to parallelize a for loop which works on an array. The array is allocated through GC_malloc. When the loop is done executing, the array is not used anymore in the program. I…
maddy99
  • 1
  • 1
0
votes
1 answer

Does GC_MALLOC actually correspond to calloc()?

According to the manual, GC_MALLOC clears the memory but GC_MALLOC_ATOMIC does not clear the memory. void * GC_MALLOC(size_t nbytes) Allocates and *clears* nbytes of storage. void * GC_MALLOC_ATOMIC(size_t nbytes) Allocates nbytes of…
user1424739
  • 11,937
  • 17
  • 63
  • 152
0
votes
1 answer

Using QT with Boehm-Demers-Weiser-Gc

Is it possible to use Qt with BDW-GC? I know that Qt has a sophisticated System for memory management, but parts of my implementation will use a GC anyway, so it would be convenient to not bother and always use it. As far as I read, one problem…
schoppenhauer
  • 411
  • 3
  • 11
0
votes
1 answer

any special considerations when using gc under mingw32 within a dll

I'm using gc in mingw32 project, and I'm encountering the following problem: when the program is linked statically, there is no problem, and the program works OK. However, after moving certain components to a dll, the program crashed. Any…
bostjanv
  • 11
  • 2
0
votes
1 answer

Boehm GC++ garbage collector : Too many heap sections Increase MAXHINCR or MAX_HEAP_SECTS

I am using the Boehm C++ Garbage collector in an application. The application uses the Levenshtein Deterministic Finite Automata Python program to calculate the Levenshtein distance between two string. I have ported the Python program to C++ on…
Frank
  • 1,406
  • 2
  • 16
  • 42
0
votes
1 answer

Does holding CPython's GIL guarantee that all cpython's threads stop?

CPython is a multi-threaded application, and as such on Unix it uses (p)threads. Python extensions (written in C, say) often need to hold GIL to make sure Python objects don't get corrupted in critical sections of the code. How about other types of…