ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

mm.h
Go to the documentation of this file.
00001 /*
00002  * GLX Hardware Device Driver common code
00003  * Copyright (C) 1999 Wittawat Yamwong
00004  *
00005  * Permission is hereby granted, free of charge, to any person obtaining a
00006  * copy of this software and associated documentation files (the "Software"),
00007  * to deal in the Software without restriction, including without limitation
00008  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00009  * and/or sell copies of the Software, and to permit persons to whom the
00010  * Software is furnished to do so, subject to the following conditions:
00011  *
00012  * The above copyright notice and this permission notice shall be included
00013  * in all copies or substantial portions of the Software.
00014  *
00015  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00016  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00017  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00018  * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, 
00019  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
00020  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 
00021  * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00022  */
00023 
00024 
00031 #ifndef MM_H
00032 #define MM_H
00033 
00034 
00035 #include "imports.h"
00036 
00037 
00038 struct mem_block {
00039    struct mem_block *next, *prev;
00040    struct mem_block *next_free, *prev_free;
00041    struct mem_block *heap;
00042    unsigned ofs;
00043    unsigned size;
00044    unsigned free:1;
00045    unsigned reserved:1;
00046 };
00047 
00048 
00049 
00054 extern struct mem_block *mmInit(unsigned ofs, unsigned size);
00055 
00066 extern struct mem_block *mmAllocMem(struct mem_block *heap, unsigned size, 
00067                                     unsigned align2, unsigned startSearch);
00068 
00074 extern int mmFreeMem(struct mem_block *b);
00075 
00081 extern struct mem_block *mmFindBlock(struct mem_block *heap, unsigned start);
00082 
00086 extern void mmDestroy(struct mem_block *mmInit);
00087 
00091 extern void mmDumpMemInfo(const struct mem_block *mmInit);
00092 
00093 #endif

Generated on Sun May 27 2012 04:19:14 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.