|
Open Model Railroad Network (OpenMRN)
|
Go to the source code of this file.
Functions | |
| void * | usb_malloc (unsigned long length) |
| Custom malloc function for USB space. | |
| DECLARE_CONST (use_separate_stack_segment) | |
| Set this to true to allocate stacks in a separate memory segment (usually ethernet RAM). | |
| void * | stack_malloc (unsigned long length) |
| Custom malloc function for stack spaces. | |
| void * | buffer_malloc (size_t length) |
| Allocates a buffer. | |
Variables | |
| char | __ETHRAM_segment_start__ |
| Linker symbol defining the address where the ethernet RAM segment starts in the 32-bit address space. | |
| static char * | sstack_start = &__ETHRAM_segment_start__ |
| Next byte that's free in the stack memory allocation segment. | |
| char | __stacks_min__ |
| Linker symbol defining the first byte that is used by the interrupt stack in the stack segment. | |
| char | __USBRAM_segment_start__ |
| Linker symbol defining the address where the USB RAM segment starts in the 32-bit address space. | |
| char | __USBRAM_segment_end__ |
| Linker symbol defining the address where the USB RAM segment ends in the 32-bit address space. | |
| static char * | ublock_start = &__USBRAM_segment_start__ |
| Pointer to the next free (unallocated) byte in the USB_RAM segment. | |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Overrides the stack malloc function to allocate from ethernet memory on the NXP LPCxx68 processors.
Definition in file freertos_drivers/nxp/stack_malloc.c.
| void * buffer_malloc | ( | size_t | length | ) |
Allocates a buffer.
malloc implementation used for allocating buffer space.
Overrides the (weak) definition to put it to a separate RAM segment and leave more heap space free.
| size | in bytes, how large chunk we should allocate. |
Definition at line 114 of file freertos_drivers/nxp/stack_malloc.c.
| DECLARE_CONST | ( | use_separate_stack_segment | ) |
Set this to true to allocate stacks in a separate memory segment (usually ethernet RAM).
If false, stack will be allocated by malloc() on the heap.
| void * stack_malloc | ( | unsigned long | length | ) |
Custom malloc function for stack spaces.
| length | the length of block to allocate |
There is currently no way to free blocks allocated with this function, so only suitable for stacks of threads that are running throughout the entire life of the application.
Definition at line 63 of file freertos_drivers/nxp/stack_malloc.c.
| void * usb_malloc | ( | unsigned long | length | ) |
Custom malloc function for USB space.
| length | the length of block to allocate |
There is currently no way to free blocks allocated with this function, so only suitable for blocks that are running throughout the entire life of the application.
Definition at line 96 of file freertos_drivers/nxp/stack_malloc.c.
|
static |
Next byte that's free in the stack memory allocation segment.
Definition at line 44 of file freertos_drivers/nxp/stack_malloc.c.
|
static |
Pointer to the next free (unallocated) byte in the USB_RAM segment.
Definition at line 86 of file freertos_drivers/nxp/stack_malloc.c.