|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
digitalmars.D - Basic functionality without GC
Why basic functionality like associative arrays needs GC to be run,
otherwize cause memory leaks? For example, the code below slowly raise
memory usage if you don't call std.gc.fullCollect.
Generally, I have the following proposals about phobos organization:
1) Make all basic functions working with and without GC enabled.
2) Separate phobos runtime from phobos userland functions. Preferably into
different packages like "phobos." and "std.". Make first to be independent
from second, even if duplication of some functions is needed.
What do people think about this?
Sample code:
private import std.stdio;
private import std.gc;
private import std.c.time;
int main() {
int[ int ] a;
while ( true ) {
a[ 1 ] = 1;
a.remove( 1 );
usleep( 10000 );
writefln( "..." );
// fullCollect();
}
return 0;
}
Sep 28 2006
Vladimir Kulev wrote:Why basic functionality like associative arrays needs GC to be run, otherwize cause memory leaks? For example, the code below slowly raise memory usage if you don't call std.gc.fullCollect. Generally, I have the following proposals about phobos organization: 1) Make all basic functions working with and without GC enabled. Sep 28 2006
Don Clugston wrote:Ever heard of Ares? I guess not. Check it out at dsource, it does exactly this. Sep 28 2006
Vladimir Kulev wrote:Ares developement is stalled, and I think Ares is unnecessary waste of time now. Phobos runtime is good enouth and it should be developed together with dmd. Sep 28 2006
|