Skip to content

๐Ÿ›… Memory management for tree nodes

License

Notifications You must be signed in to change notification settings

mulle-c/mulle-storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

13 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

mulle-storage

๐Ÿ›… Memory management for tree nodes

Why not just use malloc ? mulle-storage can be useful as a storage for nodes of a tree. It's likely faster and it may produce less fragmentation and it may improve locality of reference. Freed nodes will be reused. All the tree nodes can be "blown" away at once, without having to free each node individually.

Why is not a mulle_structarray ? A struct array would have holes, when nodes are freed randomly. Also freed nodes on their own would need to be managed externally. mulle-storage does this, but uses a struct queue instead, so it does not have to deal with holes.

Release Version Release Notes
Mulle kybernetiK tag Build Status RELEASENOTES

You are here

Overview

Add

This project is a component of the mulle-core library. As such you usually will not add or install it individually, unless you specifically do not want to link against mulle-core.

Add as an individual component

Use mulle-sde to add mulle-storage to your project:

mulle-sde add github:mulle-c/mulle-storage

To only add the sources of mulle-storage with dependency sources use clib:

clib install --out src/mulle-c mulle-c/mulle-storage

Add -isystem src/mulle-c to your CFLAGS and compile all the sources that were downloaded with your project.

Install

Install with mulle-sde

Use mulle-sde to build and install mulle-storage and all dependencies:

mulle-sde install --prefix /usr/local \
   https://github.com/mulle-c/mulle-storage/archive/latest.tar.gz

Manual Installation

Install the requirements:

Requirements Description
mulle-container ๐Ÿ›„ Arrays, hashtables and a queue

Download the latest tar or zip archive and unpack it.

Install mulle-storage into /usr/local with cmake:

cmake -B build \
      -DCMAKE_INSTALL_PREFIX=/usr/local \
      -DCMAKE_PREFIX_PATH=/usr/local \
      -DCMAKE_BUILD_TYPE=Release &&
cmake --build build --config Release &&
cmake --install build --config Release

Author

Nat! for Mulle kybernetiK

About

๐Ÿ›… Memory management for tree nodes

Resources

License

Stars

Watchers

Forks

Packages

No packages published