D - Bug : GC can't allocate a large buffer
- yaneurao sun-inet.or.jp (19/19) Jan 05 2004 In Win9x , GC can't allocate large buffers like this.
 
In Win9x , GC can't allocate large buffers like this.
byte [] v = new byte[4096*256];
GC can't allocate this. Somebody said something is wrong with GC,
but I don't think so.
When allocPage is failed , fullcollect would be called.
GetThreadContext in fullcollect returns FALSE.
and make an assert failure.
: Thread t = threads[n] ;
: if( !GetThreadContext( t.hdl, &context ) ){
:  assert(0) ;  // here
: }
Obviously t.hdl is the duplicated handle made by calling
getCurrentThreadHandle() from Thread.this() in std.thread.
But getCurrentThreadHandle can't duplicate this.
After DuplicateHandle is called, GetLastError says 'invalid handle' in Win9x.
(Now I can't guess why it is..)
That's all why GC can't allocate and GC looks to have a failure.
It is a very serious problem , I think. Fix required.
yaneurao.
 Jan 05 2004








 
 
 
 yaneurao sun-inet.or.jp