This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

bug in dll_crt0_1()?


Interesting situation:

I have a function that is called from dll_crt0_1 via
  do_global_ctors (&__CTOR_LIST__, 1);
that uses malloc(). Malloc is not ready until malloc_init, called from
heap_init() called from memory_init(), called from ... dll_crt0_1.

Should the memory_init() occur earlier, or should the global constructor
call memory_init() directly? or should malloc() check that memory_init()
has been called?

Rob


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]