Unverified Commit 9f7e309f authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

small updates to MyPage and convert MyPoolChunk similar to MyPage

parent a3cc7581
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -430,6 +430,7 @@ INPUT = @LAMMPS_SOURCE_DIR@/utils.cpp \
                         @LAMMPS_SOURCE_DIR@/potential_file_reader.h   \
                         @LAMMPS_SOURCE_DIR@/my_page.cpp               \
                         @LAMMPS_SOURCE_DIR@/my_page.h                 \
                         @LAMMPS_SOURCE_DIR@/my_pool_chunk.cpp         \
                         @LAMMPS_SOURCE_DIR@/my_pool_chunk.h           \

# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+4 −0
Original line number Diff line number Diff line
@@ -1162,3 +1162,7 @@ its size is registered later with :cpp:func:`vgot()
.. doxygenclass:: LAMMPS_NS::MyPage
   :project: progguide
   :members:

.. doxygenclass:: LAMMPS_NS::MyPoolChunk
   :project: progguide
   :members:
+1 −1
Original line number Diff line number Diff line
@@ -555,7 +555,7 @@ bigint AtomVecBody::memory_usage_bonus()
{
  bigint bytes = 0;
  bytes += nmax_bonus*sizeof(Bonus);
  bytes += icp->size + dcp->size;
  bytes += icp->size() + dcp->size();

  int nall = nlocal_bonus + nghost_bonus;
  for (int i = 0; i < nall; i++) {
+3 −2
Original line number Diff line number Diff line
@@ -29,8 +29,9 @@ using namespace LAMMPS_NS;
 * The chunks are not returnable like with malloc() (i.e. you cannot
 * call free() on them individually).  One can only reset and start over.
 * The purpose of this class is to replace many small memory allocations
 * via malloc() with a few large ones.  Since the pages are never freed,
 * they can be re-used without having to re-allocate them.
 * via malloc() with a few large ones.  Since the pages are never freed
 * until the class is re-initialized, they can be re-used without having
 * to re-allocate them by calling the reset() method.
 *
 * The settings *maxchunk*, *pagesize*, and *pagedelta* control
 * the memory allocation strategy.  The *maxchunk* value represents
+0 −4
Original line number Diff line number Diff line
@@ -18,10 +18,6 @@
#ifndef LAMMPS_MY_PAGE_H
#define LAMMPS_MY_PAGE_H

#if defined(LMP_USER_INTEL) && !defined(LAMMPS_MEMALIGN) && !defined(_WIN32)
#define LAMMPS_MEMALIGN 64
#endif

#include "lmptype.h"

namespace LAMMPS_NS {
Loading