Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2007-09-19 15:37:08


On 09/19/07 14:11, Larry Evans wrote:
[snip]
>>> main_test only contains:
>>>
>>> #include "cppgc.hpp"
>>> #include <iostream>
>>> int main(void)
>>> {
>>> void*p=dlmalloc(20);
>>> void*a_page=_page::operator new(sizeof(_page));
>>> std::cout<<"running "<<__FILE__<<"\n";
>>> std::cout<<"p="<<p<<"\n";
>>> std::cout<<"a_page="<<a_page<<"\n";
>>> return 0;
>>> }
>> I removed dlmalloc...I will try to compile it under Linux as soon as
>> possible.
>
> I'm mystified by what's happening because when I changed main to:
>
> _page*a_page=new _page;
>
> I got the segfault again even when the _page::operator new had:
>
> void*p=
> #if 0
> _CPPGC_MALLOC(gc::_mem_space, size);
> #else
> 0;
> #endif
>
> ???
OOPS. Maybe because a _page cannot be constructed at location 0 :)

Anyway, I tried running with:

   void*p=::operator new(size);

and it worked, then tried with src/main.cpp but it never terminated
until I manually aborted.

Hope you can get the unix working soon.

Good luck!


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk