diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-02-19 05:18:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-02-19 05:18:00 +0000 |
commit | 8367fa55237b3d925af7e64f2c0ad7296c6f680c (patch) | |
tree | 53bcb3aa605b49a27d6bb6e859e172a0a87158ce /Carpet/CarpetIOASCII | |
parent | 2b53b35d88eca2df28f12d71e294024f5ad5a6b0 (diff) |
CarpetIOASCII: Pass size of memory region when allocating mem<T> object
darcs-hash:20080219051851-dae7b-5088e1f07e361f7a20ae97284fd3e79fd11fc4c3.gz
Diffstat (limited to 'Carpet/CarpetIOASCII')
-rw-r--r-- | Carpet/CarpetIOASCII/src/ioascii.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Carpet/CarpetIOASCII/src/ioascii.cc b/Carpet/CarpetIOASCII/src/ioascii.cc index c0f2a33b0..b9c9f7dd5 100644 --- a/Carpet/CarpetIOASCII/src/ioascii.cc +++ b/Carpet/CarpetIOASCII/src/ioascii.cc @@ -1407,9 +1407,10 @@ namespace CarpetIOASCII { vector<gdata*> tmps (gfdatas.size()); for (size_t n=0; n<gfdatas.size(); ++n) { tmps.at(n) = gfdatas.at(n)->make_typed (vi, error_centered, op_sync); - void * const memptr = - pool.alloc (tmps.at(n)->allocsize (gfdatas.at(n)->extent(), ioproc)); - tmps.at(n)->allocate(gfdatas.at(n)->extent(), ioproc, memptr); + size_t const memsize = + tmps.at(n)->allocsize (gfdatas.at(n)->extent(), ioproc); + void * const memptr = pool.alloc (memsize); + tmps.at(n)->allocate(gfdatas.at(n)->extent(), ioproc, memptr, memsize); } for (comm_state state; not state.done(); state.step()) { for (size_t n=0; n<gfdatas.size(); ++n) { |