Boost logo

Boost :

From: jk_at_[hidden]
Date: 2001-06-05 08:34:27


4 Jun 2001 02:50:53 +0400 Beman Dawes wrote:
> >Yet every time I read about pool/small object allocators, the reference
> >count of the shared_ptr libraries screams out as a classic example, if an
> >int is not a small object, what is?!
> >
> >Is there any reason not to investigate this for boost? Or has this
>already
> >been evaluated and rejected?
>
>Just inertia AFAIK. I think someone (Dave?) did this for some timings
>quite a while ago, but before Boost.Pool was accepted.
>
>If someone would like to pull together such a version, I'm sure Greg and I
>would appreciate it.

By the way, test_pool_alloc.cpp is crached - g++ 2.95.3, glibc 2.1.1, with or
without STLport. For example, compiled without STLport:

$uname -sr
Linux 2.2.16
$g++ -o test_pool_alloc test_pool_alloc.cpp
$./test_pool_alloc
zsh: segmentation fault ./test_pool_alloc
$gdb ./test_pool_alloc
GNU gdb 4.17.0.11 with Linux support
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run

Program received signal SIGSEGV, Segmentation fault.
0x400ca7b2 in __overflow (f=0x40049578, ch=-1) at genops.c:197
genops.c:197: No such file or directory.
(gdb) bt
#0 0x400ca7b2 in __overflow (f=0x40049578, ch=-1) at genops.c:197
#1 0x400cbe25 in _IO_old_file_xsputn (f=0x40049578, data=0x805618e, n=17)
    at oldfileops.c:727
#2 0x40038ba2 in filebuf::xsputn ()
#3 0x4003c376 in ostream::operator<< ()
#4 0x804a320 in test ()
#5 0x804ae87 in main ()
#6 0x4008ccb3 in __libc_start_main (main=0x804ae7c <main>, argc=1,
                                         argv=0xbffff774, init=0x8049e78
                                         <_init>, fini=0x805603c <_fini>,
                                             rtld_fini=0x4000a350 <_dl_fini>,
                                             stack_end=0xbffff76c)
    at ../sysdeps/generic/libc-start.c:78

Is it my mistake, or something else?

-- 
jk

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