|
Boost : |
From: Larry Evans (cppljevans_at_[hidden])
Date: 2007-09-19 13:43:46
On 09/19/07 10:49, Achilleas Margaritis wrote:
[snip]
>>> I am downloading Fedora Core and I will install it under VMWare, so as
>>> that I can compile the code for Linux as well.
I'm getting a segmentation fault:
gcc.link ../../bin.v2/sandbox/axilmar/gcc-4.1/debug/main_test
Jamfile</home/evansl/prog_dev/boost-svn/ro/trunk/sandbox/axilmar>.capture-output
../../bin.v2/sandbox/axilmar/gcc-4.1/debug/main_test.output
***running ../../bin.v2/sandbox/axilmar/gcc-4.1/debug/main_test
/bin/sh: line 2: 14060 Segmentation fault
../../bin.v2/sandbox/axilmar/gcc-4.1/debug/main_test
...updated 4 targets...
I added some debug prints to the _page::new:
//allocate page from mspaces
void *_page::operator new(size_t size) {
std::cout<<"_page::operator new at "<<__FILE__<<":"<<__LINE__<<"\n";
void*p=
#if 1
_CPPGC_MALLOC(gc::_mem_space, size);
#else
0;
#endif
std::cout<<"_page::operator new at p="
//<<p
<<"\n";
return p;
}
When the '#if 1' is changed to '#if 0', I get:
***running ../../bin.v2/sandbox/axilmar/gcc-4.1/debug/main_test
_page::operator new at ./cppgc/include/cppgc.hpp:648
_page::operator new at p=
running main_test.cpp
p=0x8456008
a_page=0
...updated 4 targets...
Compilation finished at Wed Sep 19 12:41:55
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;
}
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk