[Boost-bugs] [Boost C++ Libraries] #4522: allocation problem after grow

Subject: [Boost-bugs] [Boost C++ Libraries] #4522: allocation problem after grow
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-08-08 06:40:04


#4522: allocation problem after grow
------------------------------------------------------------+---------------
 Reporter: razzik@… | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: Boost 1.44.0 | Component: interprocess
  Version: Boost 1.43.0 | Severity: Showstopper
 Keywords: interprocess shared_memory ipc grow allocation |
------------------------------------------------------------+---------------
 Hi,

 the allocation mechanism damaged by call grow() function...

 This part work fine:

 ''/* Create SM - Size 100K*/[[BR]]managed_shared_memory
 shm(create_only, "MySM", 100*1024);[[BR]]/* SM full size -
 100K*/[[BR]]int fullSMSize = shm.get_size();[[BR]]/* SM mem size - 100K
 - sizeof(SM Header)*/[[BR]]int memSMSize = shm.get_free_memory;[[BR]]/*
 alloc 64K in SM (64K<100K)*/[[BR]]void* ptr = shm.allocate(64*1024);''

 By adding grow function the allocate function throws exception:

 ''/* Create SM - Size 100K*/[[BR]]managed_shared_memory
 shm(create_only, "MySM", 100*1024);[[BR]]'''/* Grow SM By
 28K*/[[BR]]managed_shared_memory::grow("MySM",28*1024);[[BR]]'''/* SM
 full size - 128K*/[[BR]]int fullSMSize = shm.get_size();[[BR]]/* SM mem
 size - 128K - sizeof(SM Header)*/[[BR]]int memSMSize =
 shm.get_free_memory;[[BR]]/* alloc 64K in SM (64K<128K)*/[[BR]]void*
 ptr = shm.allocate(64*1024);''

 Thanks,
 Raz

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4522>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC