SpiNNFrontEndCommon 7.3.1
Common support code for user-facing front end systems.
Loading...
Searching...
No Matches
malloc_extras.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 The University of Manchester
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * https://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
19#ifndef __MALLOC_EXTRAS_H__
20#define __MALLOC_EXTRAS_H__
21
22#include <sark.h>
23#include <common-typedefs.h>
24#include <debug.h>
25
39
40// ===========================================================================
41
45
48
51void malloc_extras_terminate(uint result_code);
52
55void malloc_extras_free(void *ptr);
56
63
70void *malloc_extras_malloc(uint bytes);
71
75
77#define MALLOC malloc_extras_malloc
79#define FREE malloc_extras_free
81#define FREE_MARKED malloc_extras_free_marked
83#define MALLOC_SDRAM malloc_extras_sdram_malloc_wrapper
84
85#endif // __PLATFORM_H__
Data type definitions for SpiNNaker Neuron-modelling.
SpiNNaker debug header file.
uint malloc_extras_max_available_block_size(void)
Locates the biggest block of available memory from the heaps.
void * malloc_extras_malloc(uint bytes)
Allows a search of the 2 heaps available. (DTCM, stolen SDRAM)
void * malloc_extras_sdram_malloc(uint bytes)
Mallocs a number of bytes from SDRAM.
exit_states_for_user_one
The different states to report through vcpu->user1
@ EXITED_CLEANLY
Everything is fine.
@ EXIT_FAIL
We went wrong but we dont want to RTE.
@ EXIT_MALLOC
We ran out of space and we want to RTE.
@ DETECTED_MALLOC_FAILURE
We detected a problem and want to RTE.
@ EXIT_SWERR
We hit an internal error and we want to RTE.
void malloc_extras_terminate(uint result_code)
Stops execution with a result code.
void malloc_extras_free(void *ptr)
Frees a pointer without any marker for application code.
void malloc_extras_turn_off_print(void)
Turn off printing.
void malloc_extras_turn_on_print(void)
Turn on printing.
unsigned int uint