Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
howard_fallback_memory_test.cc File Reference

The memory that the fallback of howard_minimum_mean_cycle() to Karp's algorithm reserves, measured on the allocations themselves (audit 2026-10-02, stage C). More...

#include <Howard_Min_Mean_Cycle.H>
#include <gtest/gtest.h>
#include <cstdio>
#include <cstdlib>
#include <new>
#include <random>
#include <tuple>
#include <vector>
#include <tpl_graph.H>
#include "negative_cycles_test_support.H"
Include dependency graph for howard_fallback_memory_test.cc:

Go to the source code of this file.

Macros

#define PROBE_ALLOCATIONS   1
 
#define PROBE_NOINLINE
 

Functions

void * operator new (const std::size_t size)
 
void * operator new[] (const std::size_t size)
 
void * operator new (const std::size_t size, const std::nothrow_t &) noexcept
 
void * operator new[] (const std::size_t size, const std::nothrow_t &) noexcept
 
void operator delete (void *p) noexcept
 
void operator delete[] (void *p) noexcept
 
void operator delete (void *p, std::size_t) noexcept
 
void operator delete[] (void *p, std::size_t) noexcept
 
void operator delete (void *p, const std::nothrow_t &) noexcept
 
void operator delete[] (void *p, const std::nothrow_t &) noexcept
 
 TEST (HowardFallbackMemoryTest, TheLimitCountsTheTablesKarpReserves)
 
 TEST (HowardFallbackMemoryTest, SumsBeyondLongLongTakeSixteenBytesAndTheLimitKnows)
 
 TEST (HowardFallbackMemoryTest, NodesOutsideTheCyclesCostTheFallbackNothing)
 

Detailed Description

The memory that the fallback of howard_minimum_mean_cycle() to Karp's algorithm reserves, measured on the allocations themselves (audit 2026-10-02, stage C).

This program replaces the global allocation functions: while the probe is active they record the two largest requests. The replacement stays out of the other test programs. A sanitizer that brings its own allocator defines those functions in its runtime (ThreadSanitizer and MemorySanitizer link them into the program, so a second definition does not link): under one, the replacement is left out and the tests are skipped.

Definition in file howard_fallback_memory_test.cc.

Macro Definition Documentation

◆ PROBE_ALLOCATIONS

#define PROBE_ALLOCATIONS   1

Definition at line 75 of file howard_fallback_memory_test.cc.

◆ PROBE_NOINLINE

#define PROBE_NOINLINE

Definition at line 111 of file howard_fallback_memory_test.cc.

Function Documentation

◆ operator delete() [1/3]

void operator delete ( void *  p)
noexcept

Definition at line 152 of file howard_fallback_memory_test.cc.

◆ operator delete() [2/3]

void operator delete ( void *  p,
const std::nothrow_t &   
)
noexcept

Definition at line 156 of file howard_fallback_memory_test.cc.

◆ operator delete() [3/3]

void operator delete ( void *  p,
std::size_t   
)
noexcept

Definition at line 154 of file howard_fallback_memory_test.cc.

◆ operator delete[]() [1/3]

void operator delete[] ( void *  p)
noexcept

Definition at line 153 of file howard_fallback_memory_test.cc.

◆ operator delete[]() [2/3]

void operator delete[] ( void *  p,
const std::nothrow_t &   
)
noexcept

Definition at line 157 of file howard_fallback_memory_test.cc.

◆ operator delete[]() [3/3]

void operator delete[] ( void *  p,
std::size_t   
)
noexcept

Definition at line 155 of file howard_fallback_memory_test.cc.

◆ operator new() [1/2]

void * operator new ( const std::size_t  size)

◆ operator new() [2/2]

void * operator new ( const std::size_t  size,
const std::nothrow_t &   
)
noexcept

◆ operator new[]() [1/2]

void * operator new[] ( const std::size_t  size)

Definition at line 143 of file howard_fallback_memory_test.cc.

References Aleph::size().

◆ operator new[]() [2/2]

void * operator new[] ( const std::size_t  size,
const std::nothrow_t &   
)
noexcept

◆ TEST() [1/3]

TEST ( HowardFallbackMemoryTest  ,
NodesOutsideTheCyclesCostTheFallbackNothing   
)

◆ TEST() [2/3]

TEST ( HowardFallbackMemoryTest  ,
SumsBeyondLongLongTakeSixteenBytesAndTheLimitKnows   
)

◆ TEST() [3/3]

TEST ( HowardFallbackMemoryTest  ,
TheLimitCountsTheTablesKarpReserves   
)