Loading...
Searching...
No Matches
malloc.h File Reference

Go to the source code of this file.

## Data Structures

struct | block

## Macros

#define | CHUNK_SIZE
#define | CHUNK_ALLOC_MAX
#define | CHUNK_ALLOC_MIN
#define | CHUNKS_NFREE
#define | CHUNK_NBLOCKS

## Functions

void | _starpu_malloc_init (unsigned dst_node)
void | _starpu_malloc_shutdown (unsigned dst_node)
int | _starpu_malloc_flags_on_node (unsigned dst_node, void **A, size_t dim, int flags)
int | _starpu_free_flags_on_node (unsigned dst_node, void *A, size_t dim, int flags)
int | _starpu_malloc_willpin_on_node (unsigned dst_node)

## Data Structure Documentation

## block

struct block

Data Fields
int | length |
int | next |

## Macro Definition Documentation

## CHUNK_SIZE

#define CHUNK_SIZE

On CUDA which has very expensive malloc, for small sizes, allocate big chunks divided in blocks, and we actually allocate segments of consecutive blocks.

We try to keep the list of chunks with increasing occupancy, so we can quickly find free segments to allocate.

## Function Documentation

## _starpu_malloc_willpin_on_node()

int _starpu_malloc_willpin_on_node | ( | unsigned | dst_node | ) |

Returns whether when allocating data on `dst_node`, we will do pinning, i.e. the allocation will be very expensive, and should thus be moved out from the critical path