SDSL 3.0.3
Succinct Data Structure Library
Loading...
Searching...
No Matches
memory_management.hpp File Reference

memory_management.hpp contains two function for allocating and deallocating memory More...

#include <algorithm>
#include <chrono>
#include <cstdlib>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <iostream>
#include <map>
#include <memory>
#include <new>
#include <sstream>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <system_error>
#include <unistd.h>
#include <utility>
#include <vector>
#include <sdsl/config.hpp>
#include <sdsl/memory_tracking.hpp>
#include <sdsl/ram_fs.hpp>
#include <sys/mman.h>

Go to the source code of this file.

Classes

struct  sdsl::mm_block
 
struct  sdsl::bfoot
 
class  sdsl::hugepage_allocator
 
class  sdsl::memory_manager
 

Namespaces

namespace  sdsl
 Namespace for the succinct data structure library.
 

Macros

#define ALIGNMENT   sizeof(uint64_t)
 
#define ALIGNSPLIT(size)
 
#define ALIGN(size)
 
#define MM_BLOCK_OVERHEAD   (sizeof(size_t) + sizeof(size_t))
 
#define MIN_BLOCKSIZE   (ALIGN(sizeof(mm_block_t) + sizeof(mm_block_foot_t)))
 
#define UNMASK_SIZE(size)
 
#define ISFREE(size)
 
#define SETFREE(size)
 
#define SPLIT_THRESHOLD   (MIN_BLOCKSIZE)
 

Typedefs

typedef struct sdsl::mm_block sdsl::mm_block_t
 
typedef struct sdsl::bfoot sdsl::mm_block_foot_t
 

Functions

void sdsl::output_event_json (std::ostream &out, mm_event const &ev, tracker_storage const &m)
 
template<>
void sdsl::write_mem_log< JSON_FORMAT > (std::ostream &out, tracker_storage const &m)
 
std::string sdsl::create_mem_html_header ()
 
std::string sdsl::create_mem_js_body (std::string const &jsonObject)
 
template<>
void sdsl::write_mem_log< HTML_FORMAT > (std::ostream &out, tracker_storage const &m)
 
mm_block_tsdsl::block_cur (void *ptr)
 
mm_block_tsdsl::block_prev (mm_block_t *cur_bptr, mm_block_t *first)
 
mm_block_tsdsl::block_next (mm_block_t *cur_bptr, uint8_t *top)
 
size_t sdsl::block_size (void *ptr)
 
bool sdsl::block_isfree (mm_block_t *ptr)
 
bool sdsl::block_nextfree (mm_block_t *ptr, uint8_t *top)
 
bool sdsl::block_prevfree (mm_block_t *ptr, mm_block_t *begin)
 
void sdsl::foot_update (mm_block_t *ptr, size_t size)
 
void sdsl::block_update (mm_block_t *ptr, size_t size)
 
void * sdsl::block_data (mm_block_t *ptr)
 
size_t sdsl::block_getdatasize (mm_block_t *ptr)
 
void sdsl::block_markfree (mm_block_t *ptr)
 
void sdsl::block_markused (mm_block_t *ptr)
 

Detailed Description

memory_management.hpp contains two function for allocating and deallocating memory

Author
Simon Gog

Definition in file memory_management.hpp.

Macro Definition Documentation

◆ ALIGN

#define ALIGN ( size)
Value:
(((size) + (ALIGNMENT - 1)) & ~0x7)
#define ALIGNMENT

Definition at line 267 of file memory_management.hpp.

◆ ALIGNMENT

#define ALIGNMENT   sizeof(uint64_t)

Definition at line 265 of file memory_management.hpp.

◆ ALIGNSPLIT

#define ALIGNSPLIT ( size)
Value:
(((size)) & ~0x7)

Definition at line 266 of file memory_management.hpp.

◆ ISFREE

#define ISFREE ( size)
Value:
((size)&1)

Definition at line 271 of file memory_management.hpp.

◆ MIN_BLOCKSIZE

#define MIN_BLOCKSIZE   (ALIGN(sizeof(mm_block_t) + sizeof(mm_block_foot_t)))

Definition at line 269 of file memory_management.hpp.

◆ MM_BLOCK_OVERHEAD

#define MM_BLOCK_OVERHEAD   (sizeof(size_t) + sizeof(size_t))

Definition at line 268 of file memory_management.hpp.

◆ SETFREE

#define SETFREE ( size)
Value:
((size) | 1)

Definition at line 272 of file memory_management.hpp.

◆ SPLIT_THRESHOLD

#define SPLIT_THRESHOLD   (MIN_BLOCKSIZE)

Definition at line 273 of file memory_management.hpp.

◆ UNMASK_SIZE

#define UNMASK_SIZE ( size)
Value:
((size) & ~1)

Definition at line 270 of file memory_management.hpp.