Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
amiga_platform.h File Reference

None of these functions should be called directly, they will be set up by the generated system and all code should use the platform-agnostic AllocMemory(), AllocMemoryArray() and FreeMemory() instead. More...

#include <exec/types.h>
Include dependency graph for amiga_platform.h:

Go to the source code of this file.

Functions

void InitAmigaAllocator (void)
 Initialise the memory allocator for Amiga OS4. More...
 
void ExitAmigaAllocator (void)
 Free any resources used by the memory allocator for AmigaOS 4.x. More...
 
void * AllocateAmigaMemory (uint32 size)
 Allocate a block of memory of the given size on AmigaOS 4.x. More...
 
void * AllocateAmigaZeroedArray (uint32 num_elements, uint32 size)
 Allocate an array of memory blocks on AmigaOS 4.x. More...
 
void * ReallocateAmigaMemory (void *old_p, uint32 new_size, uint32 old_size)
 Reallocate a memory block on AmigaOS 4.x. More...
 
void FreeAmigaMemory (void *mem_p)
 Free some memory created by AllocAmigaMemory() or AllocAmigaMemoryArray() More...
 

Detailed Description

None of these functions should be called directly, they will be set up by the generated system and all code should use the platform-agnostic AllocMemory(), AllocMemoryArray() and FreeMemory() instead.

Function Documentation

◆ InitAmigaAllocator()

void InitAmigaAllocator ( void  )

Initialise the memory allocator for Amiga OS4.

◆ ExitAmigaAllocator()

void ExitAmigaAllocator ( void  )

Free any resources used by the memory allocator for AmigaOS 4.x.

◆ AllocateAmigaMemory()

void* AllocateAmigaMemory ( uint32  size)

Allocate a block of memory of the given size on AmigaOS 4.x.

Parameters
sizeThe size of the required memory block in bytes.
Returns
The uninitialised memory block or NULL upon error.

◆ AllocateAmigaZeroedArray()

void* AllocateAmigaZeroedArray ( uint32  num_elements,
uint32  size 
)

Allocate an array of memory blocks on AmigaOS 4.x.

Parameters
num_elementsThe number of memory blocks to allocate.
sizeThe size of each of the required memory block in bytes.
Returns
The memory blocks which have all been initialised to 0 or NULL upon error.

◆ ReallocateAmigaMemory()

void* ReallocateAmigaMemory ( void *  old_p,
uint32  new_size,
uint32  old_size 
)

Reallocate a memory block on AmigaOS 4.x.

The values will be copied from the old block to the new one if required whilst respecting buffer limits.

Parameters
old_pThe memory block to reallocate.
new_sizeThe size of the new memory block.
old_sizeThe size of the old memory block.
Returns
The reallocated memory block or NULL upon error.

◆ FreeAmigaMemory()

void FreeAmigaMemory ( void *  mem_p)

Free some memory created by AllocAmigaMemory() or AllocAmigaMemoryArray()

Parameters
mem_pThe memory block to free.