代码拉取完成,页面将自动刷新
同步操作将从 牧梦追马/xmem 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/*
* xmem configurations
* Copyright (c) 2016, Shoowing <420260138@qq.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of Apache License Version 2.0
*
* See README for more details.
*/
#ifndef __XCONFIG_H__
#define __XCONFIG_H__
#define XMEM_DEBUG 0
#define CPU_64_BIT 0
#define XMEM_SUPERBLOCK_ENABLE 1
#define XMEM_SUPERBLOCK_BLKS_MAX 32
/*****************************************************************************
*MACRO
*XMEM_CORRUPT_CHECK
*DESCRIPTION
*corrupt check, for debug purpose
*0
*------------------------------------------------------------------------------
*|Header List| xMemHdrEnd--->| ... |<---xMemBlkStart |Blocks,Super Blocks|
*------------------------------------------------------------------------------
*1
*--------------------------------------------------------------
*| | prev | blk | next | |
*| ... |--------------|--------------|--------------| ... |
*| |header| mem |header| mem |header| mem | |
--------------------------------------------------------------
*******************************************************************************/
#define XMEM_CORRUPT_CHECK 0
#if CPU_64_BIT
#define XMEM_META_BLOCK_SIZE ((u32)8)
#define XMEM_8META_ENABLE 0
#define XMEM_SUPERBLOCK_LIST_COUNT 3
#else
#define XMEM_META_BLOCK_SIZE ((u32)4)
#define XMEM_8META_ENABLE 1
#if XMEM_8META_ENABLE
#define XMEM_SUPERBLOCK_LIST_COUNT 4
#else
#define XMEM_SUPERBLOCK_LIST_COUNT 3
#endif
#endif
#define XMEM_BALLANCE_SIZE (XMEM_META_BLOCK_SIZE*4)
/******************************************************************************************
* on 32-bit cpu, xMemMgrHdr requires 8 bytes, xMemBlock requires 16 bytes, to manage a
* block will spend 24 bytes for a header
*
* on 64-bit cpu, xMemMgrHdr requires 12 bytes, xMemBlock requires 24 bytes, to manage a
* block will spend 36 bytes for a header
*
* ballance size determined waste size when a free block lager than requrired
*******************************************************************************************/
#define XMEM_2META_BLOCK_SIZE (XMEM_META_BLOCK_SIZE*2)
#define XMEM_4META_BLOCK_SIZE (XMEM_META_BLOCK_SIZE*4)
#define XMEM_8META_BLOCK_SIZE (XMEM_META_BLOCK_SIZE*8)
#define XMEM_SUPERBLOCK_1META_CNT ((u32)16)
#define XMEM_SUPERBLOCK_2META_CNT ((u32)32)
#define XMEM_SUPERBLOCK_4META_CNT ((u32)16)
#define XMEM_SUPERBLOCK_8META_CNT ((u32)16)
#define XMEM_SUPERBLOCK_1META_MIN_SIZE (XMEM_META_BLOCK_SIZE*XMEM_SUPERBLOCK_1META_CNT)
#define XMEM_SUPERBLOCK_2META_MIN_SIZE (XMEM_2META_BLOCK_SIZE*XMEM_SUPERBLOCK_2META_CNT)
#define XMEM_SUPERBLOCK_4META_MIN_SIZE (XMEM_4META_BLOCK_SIZE*XMEM_SUPERBLOCK_4META_CNT)
#define XMEM_SUPERBLOCK_8META_MIN_SIZE (XMEM_8META_BLOCK_SIZE*XMEM_SUPERBLOCK_8META_CNT)
#endif // __XCONFIG_H__
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。