Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #610 (new enhancement)

Opened 13 years ago

Last modified 11 years ago

Add allocationsAllowed(bool)

Reported by: keinfarbton Assigned to: kris
Priority: normal Milestone: 2.0
Component: Core Functionality Version: 0.99 RC3 Xammy
Keywords: triage Cc:


In situations where it is not possible to allow GC runs, it would be cool to have this.

Therefore the GC needs to have one more methods:

  • allocationsAllowed( bool enable );

if the application calls allocationsAllowed( false ), any allocation, even from the tango internals will cause an exception to happen. In this case, it should be a subclass of TracedException??.

This allows applications to detect there memory leaks quickly.

Change History

09/03/07 19:53:53 changed by larsivi

  • summary changed from In situations where it is not possible to allow GC runs, it would be cool to have this. to Add allocationsAllowed(bool).

09/11/07 16:38:20 changed by keinfarbton

I think it would be also really cool to have this flag on a per thread basis. In my current application i had massive memory problems, which were really hard to figure out where the memory is consumed. If I could allow memory allocation only in the certain thread and just before an allocation happens and disallow it immediately after, i had found the problematic places very fast.

09/11/07 16:47:21 changed by kris

does the compiler support a version(debug) or version (release) ?

01/28/08 16:21:29 changed by JarrettBillingsley

Yeah, it's:

    // I'm in debug mode!
    // I'm in release mode!

05/24/08 19:37:20 changed by larsivi

  • keywords set to triage.

11/09/09 01:16:22 changed by kris

  • owner changed from sean to fawzi.

11/29/09 12:30:43 changed by fawzi

  • owner changed from fawzi to kris.

04/24/10 22:21:20 changed by kris

  • milestone changed from 1.0 to 2.0.