Skip to content

Commit 5929d5e

Browse files
authored
RBFMEM: A minimalistic epoch-based memory allocator (#1)
* Updated gitignore for Linux, Windows, Mac temporary files * Added basic rbfmem allocator without Drop * RBFMEM: New Time Value with support for indicating when a thread is finished * RBFMEM: Allocator frees its memory (including owned pointers) when it's safe. Still global timestamp linked list is never freed. * RBFMEM: Bug fix for timestamp free list in destructor * RBFMEM: fix timestamping ensuring array will fit all thread timestamps * RBFMEM: allocate initialized objects * RBFMEM Basic Michael Scott Queue example * RBFMEM: comments and more consistent style * RBFMEM: Simplifying interfacing with allocator (always allocate memory as a Box transformed into raw) * RBFMEM: Basic test and restructure of Michael Scott Queue * RBFMEM: iteratively dropping of free lists to prevent stack overflows from occurring * RBFMEM: Public API for indicating to other threads when it is safe to reclaim memory (useful for read only threads) * RBFMEM: Bug fix for memory leak when reusing memory * RBFMEM: fix unclear docstrings * RBFMEM: the free method is now properly marked as unsafe, since the programmer needs to meet some safety conditions
1 parent b0fccae commit 5929d5e

6 files changed

Lines changed: 755 additions & 0 deletions

File tree

.gitignore

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,85 @@
1+
##########
2+
# General
3+
##########
4+
5+
#############
6+
# Windows
7+
#############
8+
# Windows thumbnail cache files
9+
Thumbs.db
10+
Thumbs.db:encryptable
11+
ehthumbs.db
12+
ehthumbs_vista.db
13+
14+
# Dump file
15+
*.stackdump
16+
17+
# Folder config file
18+
[Dd]esktop.ini
19+
20+
# Recycle Bin used on file shares
21+
$RECYCLE.BIN/
22+
23+
# Windows Installer files
24+
*.cab
25+
*.msi
26+
*.msix
27+
*.msm
28+
*.msp
29+
30+
# Windows shortcuts
31+
*.lnk
32+
############################################################
33+
34+
#############
35+
# Linux
36+
#############
37+
*~
38+
39+
# temporary files which can be created if a process still has a handle open of a deleted file
40+
.fuse_hidden*
41+
42+
# KDE directory preferences
43+
.directory
44+
45+
# Linux trash folder which might appear on any partition or disk
46+
.Trash-*
47+
48+
# .nfs files are created when an open file is removed but is still being accessed
49+
.nfs*
50+
############################################################
51+
52+
#############
53+
# macOS
54+
#############
55+
# General
56+
.DS_Store
57+
.AppleDouble
58+
.LSOverride
59+
60+
# Icon must end with two \r
61+
Icon
62+
63+
# Thumbnails
64+
._*
65+
66+
# Files that might appear in the root of a volume
67+
.DocumentRevisions-V100
68+
.fseventsd
69+
.Spotlight-V100
70+
.TemporaryItems
71+
.Trashes
72+
.VolumeIcon.icns
73+
.com.apple.timemachine.donotpresent
74+
75+
# Directories potentially created on remote AFP share
76+
.AppleDB
77+
.AppleDesktop
78+
Network Trash Folder
79+
Temporary Items
80+
.apdisk
81+
############################################################
82+
183
/target
284
/output
385
/scripts/output

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
resolver = "2"
33
members = [
44
"benchmark_core",
5+
"memory_management",
56
"data_structures/fifo_queues/array_queue",
67
"data_structures/fifo_queues/atomic_queue",
78
"data_structures/fifo_queues/basic_queue",

memory_management/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "memory_management"
3+
version = "0.1.0"
4+
edition = "2024"
5+
6+
[dependencies]

memory_management/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub mod rbfmem;

0 commit comments

Comments
 (0)