⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 memoryi.h

📁 本程序为ST公司开发的源代码
💻 H
字号:
/* * memoryi.h * * Copyright (C) STMicroelectronics Ltd. 1996, 1997, 1998 * * Heap memory partition macros and function declarations */#ifndef __memoryi_h#define __memoryi_h#ifndef __os20_h#error Must include os20.h first#endif#define partition_fbase     partition_fast.partition_fast_base#define partition_fsize     partition_fast.partition_fast_size#define partition_ffree     partition_fast.partition_fast_free/* Mangle internal names to match those externally visible */#define partition_base      partition_heap.partition_heap_base#define partition_size      partition_heap.partition_heap_size#define partition_top       partition_heap.partition_heap_top#define partition_free_head partition_heap.partition_heap_free_head#define partition_free_tail partition_heap.partition_heap_free_tail#define partition_dummy     partition_heap.partition_heap_dummy#define partition_initialised partition_heap.partition_heap_initialised#define blockheader_t partition_heap_block_t#define __next partition_heap_block_next#define __blocksize partition_heap_block_blocksize/* Check word value */#define CHECK 0x80000001/* check that ptr supplied by the user, userp, is word aligned, also *//* check contents of blockp->info.next, if it isn't magic number fail *//* also check that size is multiple of block_header size *//* Avoid any attempt to dereference non-existant memory by checking that the   pointer is within the heap first *//*#define invalid_pointer(heap, userp, blockp) \  ((int)(userp) % sizeof(int) != 0 ||  \   (int *)blockp < ((int  *)(heap)->partition_base) ||  \   (int *)blockp >= (heap)->partition_top ||  \   (blockp)->__next != (blockheader_t *)CHECK || \   ((blockp)->__blocksize & ~(sizeof(blockheader_t) - 1)) != (blockp)->__blocksize)   */#define invalid_pointer(heap, userp, blockp) \  ((int)(userp) % sizeof(int) != 0 ||  \   (int *)blockp >= (heap)->partition_top ||  \   (blockp)->__next != (blockheader_t *)CHECK || \   ((blockp)->__blocksize & ~(sizeof(blockheader_t) - 1)) != (blockp)->__blocksize)   /* function to initialise the heap */     /*#pragma ST_translate(initheap, "initheap%c")*//*void report_partitions (void);*/#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -