mem.c

来自「MANTIS是由科罗拉多大学开发的传感器网络嵌入式操作系统。 这是mantis」· C语言 代码 · 共 49 行

C
49
字号
//  This file is part of MANTIS OS, Operating System//  See http://mantis.cs.colorado.edu/////  Copyright (C) 2003,2004,2005 University of Colorado, Boulder////  This program is free software; you can redistribute it and/or//  modify it under the terms of the mos license (see file LICENSE)/*  Project Mantis  File: mem.c  Author: Jeff Rose  Date: 01-19-04    Just a simple implementation of the mos memory functions so we can use this in linux.  TODO: Might want to add some logging functionality here to do some memory usage analysis.*/#include "mos.h"#include <stdlib.h>#include "mem.h"/* A placeholder function for compatability. */void mem_init(void *region, uint16_t size){   return;}/** Try to allocate a region of memory * @param size Size of the region to allocate. * @return NULL if not enough memory is available, else the allocated memory. */void *mos_mem_alloc(uint16_t size){   return malloc(size);}/** Free a block of memory * @param block Block of memory to free */void mos_mem_free(void* block){   free(block);}

⌨️ 快捷键说明

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