ymemory.h
Go to the documentation of this file.
1 /*********************************************************************
2  *
3  * $Id: ymemory.h 19327 2015-02-17 17:30:01Z seb $
4  *
5  * Basic memory check function to prevent memory leak
6  *
7  * - - - - - - - - - License information: - - - - - - - - -
8  *
9  * Copyright (C) 2011 and beyond by Yoctopuce Sarl, Switzerland.
10  *
11  * Yoctopuce Sarl (hereafter Licensor) grants to you a perpetual
12  * non-exclusive license to use, modify, copy and integrate this
13  * file into your software for the sole purpose of interfacing
14  * with Yoctopuce products.
15  *
16  * You may reproduce and distribute copies of this file in
17  * source or object form, as long as the sole purpose of this
18  * code is to interface with Yoctopuce products. You must retain
19  * this notice in the distributed source file.
20  *
21  * You should refer to Yoctopuce General Terms and Conditions
22  * for additional information regarding your rights and
23  * obligations.
24  *
25  * THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
26  * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
27  * WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS
28  * FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO
29  * EVENT SHALL LICENSOR BE LIABLE FOR ANY INCIDENTAL, SPECIAL,
30  * INDIRECT OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA,
31  * COST OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR
32  * SERVICES, ANY CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT
33  * LIMITED TO ANY DEFENSE THEREOF), ANY CLAIMS FOR INDEMNITY OR
34  * CONTRIBUTION, OR OTHER SIMILAR COSTS, WHETHER ASSERTED ON THE
35  * BASIS OF CONTRACT, TORT (INCLUDING NEGLIGENCE), BREACH OF
36  * WARRANTY, OR OTHERWISE.
37  *
38  *********************************************************************/
39 
40 #ifndef YMEMORY_H
41 #define YMEMORY_H
42 #include "ydef.h"
43 
44 #ifdef YSAFE_MEMORY
45 void ySafeMemoryInit(u32 nbentry);
46 void* ySafeMalloc(const char *file,u32 line,u32 size);
47 void ySafeFree(const char *file,u32 line,void *ptr);
48 void ySafeTrace(const char *file,u32 line,void *ptr);
49 void ySafeMemoryDump(void *discard);
50 void ySafeMemoryStop(void);
51 #else
52 #define ySafeMemoryInit(nbentry) {}
53 #define ySafeMemoryDump(discard) {}
54 #define ySafeMemoryStop() {}
55 #endif
56 
57 #endif
#define ySafeMemoryStop()
Definition: ymemory.h:54
#define ySafeMemoryInit(nbentry)
Definition: ymemory.h:52
#define ySafeMemoryDump(discard)
Definition: ymemory.h:53


yoctopuce_altimeter
Author(s): Anja Sheppard
autogenerated on Mon Jun 10 2019 15:49:10