source: libcfa/src/heap.hfa @ 1a2ba84

Last change on this file since 1a2ba84 was feb999f, checked in by Peter A. Buhr <pabuhr@…>, 7 months ago

formatting, change free null statistic to also count malloc(0), remove spurious union/struct in header, remove spurious CALIGN after attribute fix, update the PROLOG macro

  • Property mode set to 100644
File size: 1.7 KB
RevLine 
[ada0246d]1//
2// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// heap.hfa --
8//
9// Author           : Peter A. Buhr
10// Created On       : Tue May 26 11:23:55 2020
11// Last Modified By : Peter A. Buhr
[feb999f]12// Last Modified On : Mon Apr  1 09:36:20 2024
13// Update Count     : 25
[ada0246d]14//
15
16#pragma once
17
[31a5f418]18#include <malloc.h>
[ada0246d]19
20bool traceHeap();
21bool traceHeapOn();
22bool traceHeapOff();
23
24bool traceHeapTerm();
25bool traceHeapTermOn();
26bool traceHeapTermOff();
27
28bool checkFree();
29bool checkFreeOn();
30bool checkFreeOff();
31
32extern "C" {
[31a5f418]33        // New allocation operations.
34        void * aalloc( size_t dim, size_t elemSize ) __attribute__ ((malloc));
35        void * resize( void * oaddr, size_t size ) __attribute__ ((malloc));
36        void * amemalign( size_t align, size_t dim, size_t elemSize ) __attribute__ ((malloc));
37        void * cmemalign( size_t align, size_t dim, size_t elemSize ) __attribute__ ((malloc));
[ada0246d]38        size_t malloc_alignment( void * addr );
[4e7c0fc0]39        bool malloc_zero_fill( void * addr );
40        size_t malloc_size( void * addr );
[ada0246d]41        int malloc_stats_fd( int fd );
[31a5f418]42        size_t malloc_expansion();                                                      // heap expansion size (bytes)
43        size_t malloc_mmap_start();                                                     // crossover allocation size from sbrk to mmap
44        size_t malloc_unfreed();                                                        // heap unfreed size (bytes)
[c58ead7]45        void malloc_stats_clear();                                                      // clear heap statistics
[ada0246d]46} // extern "C"
47
[feb999f]48// New allocation operations.
[31a5f418]49void * resize( void * oaddr, size_t alignment, size_t size );
50void * realloc( void * oaddr, size_t alignment, size_t size );
51void * reallocarray( void * oaddr, size_t nalign, size_t dim, size_t elemSize );
[ada0246d]52
53// Local Variables: //
54// tab-width: 4 //
55// End: //
Note: See TracBrowser for help on using the repository browser.