loading
Papers Papers/2022 Papers Papers/2022

Research.Publish.Connect.

Paper

Paper Unlock

Authors: Blaž Rojc and Matjaž Depolli

Affiliation: Jožef Stefan Institute, Jamova cesta 39, 1000 Ljubljana, Slovenia

Keyword(s): C++, Virtual Memory, Container, Parallel Programming, Efficiency.

Abstract: Thread safety is required for shared data structures in shared-memory parallel approaches, but cannot be done efficiently for standard C++ containers with continuous memory storage, such as std::vector. Dynamically resizing such a container may cause pointer and reference invalidation and therefore cannot be done in parallel environments without exclusive access protection to the container. We present a thread-safe no-copy resizable C++ container class that can be used to store shared data among threads of a program on a shared-memory system. The container relies on the virtual memory controller to handle allocation as needed during execution. A block of memory of almost arbitrary size can be allocated, which is only mapped to physical memory during the first access, providing hardware-level thread blocking. All synchronization costs are already included in the operating system memory management, so using the container in parallel environment incurs no additional costs. As a b onus, references and pointers to elements of the container work as expected even after the container is resized. The implementation is not general however, and relies on the specifics of the operating system and computer architecture. Memory overhead can be high as the allocations are bound to the granularity of the virtual memory system. (More)

CC BY-NC-ND 4.0

Sign In Guest: Register as new SciTePress user now for free.

Sign In SciTePress user: please login.

PDF ImageMy Papers

You are not signed in, therefore limits apply to your IP address 3.136.97.64

In the current month:
Recent papers: 100 available of 100 total
2+ years older papers: 200 available of 200 total

Paper citation in several formats:
Rojc, B. and Depolli, M. (2021). A Resizable C++ Container using Virtual Memory. In Proceedings of the 16th International Conference on Software Technologies - ICSOFT; ISBN 978-989-758-523-4; ISSN 2184-2833, SciTePress, pages 481-488. DOI: 10.5220/0010557104810488

@conference{icsoft21,
author={Blaž Rojc. and Matjaž Depolli.},
title={A Resizable C++ Container using Virtual Memory},
booktitle={Proceedings of the 16th International Conference on Software Technologies - ICSOFT},
year={2021},
pages={481-488},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0010557104810488},
isbn={978-989-758-523-4},
issn={2184-2833},
}

TY - CONF

JO - Proceedings of the 16th International Conference on Software Technologies - ICSOFT
TI - A Resizable C++ Container using Virtual Memory
SN - 978-989-758-523-4
IS - 2184-2833
AU - Rojc, B.
AU - Depolli, M.
PY - 2021
SP - 481
EP - 488
DO - 10.5220/0010557104810488
PB - SciTePress