tcc_relocate: return error and remove unused code
[tinycc.git] / win32 / include / malloc.h
blobca4259689d4a3a047e5676e28bb779d29f6fd3b8
1 /*
2 * malloc.h
4 * Support for programs which want to use malloc.h to get memory management
5 * functions. Unless you absolutely need some of these functions and they are
6 * not in the ANSI headers you should use the ANSI standard header files
7 * instead.
9 * This file is part of the Mingw32 package.
11 * Contributors:
12 * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
14 * THIS SOFTWARE IS NOT COPYRIGHTED
16 * This source code is offered for use in the public domain. You may
17 * use, modify or distribute it freely.
19 * This code is distributed in the hope that it will be useful but
20 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
21 * DISCLAIMED. This includes but is not limited to warranties of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 * $Revision: 1.2 $
25 * $Author: bellard $
26 * $Date: 2005/04/17 13:14:29 $
30 #ifndef __STRICT_ANSI__
32 #ifndef _MALLOC_H_
33 #define _MALLOC_H_
35 /* All the headers include this file. */
36 #include <_mingw.h>
38 #include <stdlib.h>
40 #ifndef RC_INVOKED
43 * The structure used to walk through the heap with _heapwalk.
45 typedef struct _heapinfo
47 int* _pentry;
48 size_t _size;
49 int _useflag;
50 } _HEAPINFO;
52 /* Values for _heapinfo.useflag */
53 #define _USEDENTRY 0
54 #define _FREEENTRY 1
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
60 The _heap* memory allocation functions are supported on NT
61 but not W9x. On latter, they always set errno to ENOSYS.
63 int _heapwalk (_HEAPINFO*);
65 #ifndef _NO_OLDNAMES
66 int heapwalk (_HEAPINFO*);
67 #endif /* Not _NO_OLDNAMES */
69 int _heapchk (void); /* Verify heap integrety. */
70 int _heapmin (void); /* Return unused heap to the OS. */
71 int _heapset (unsigned int);
73 size_t _msize (void*);
74 size_t _get_sbh_threshold (void);
75 int _set_sbh_threshold (size_t);
76 void * _expand (void*, size_t);
78 #ifdef __cplusplus
80 #endif
82 #endif /* RC_INVOKED */
84 #endif /* Not _MALLOC_H_ */
86 #endif /* Not __STRICT_ANSI__ */