00001 /** @file 00002 00003 A brief file description 00004 00005 @section license License 00006 00007 Licensed to the Apache Software Foundation (ASF) under one 00008 or more contributor license agreements. See the NOTICE file 00009 distributed with this work for additional information 00010 regarding copyright ownership. The ASF licenses this file 00011 to you under the Apache License, Version 2.0 (the 00012 "License"); you may not use this file except in compliance 00013 with the License. You may obtain a copy of the License at 00014 00015 http://www.apache.org/licenses/LICENSE-2.0 00016 00017 Unless required by applicable law or agreed to in writing, software 00018 distributed under the License is distributed on an "AS IS" BASIS, 00019 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00020 See the License for the specific language governing permissions and 00021 limitations under the License. 00022 */ 00023 00024 #ifndef __INK_RESOURCE_H__ 00025 #define __INK_RESOURCE_H__ 00026 00027 #include <stdio.h> 00028 #include <stdlib.h> 00029 #include <string.h> 00030 00031 #include "ink_apidefs.h" 00032 #include "ink_defs.h" 00033 #include "ink_memory.h" 00034 00035 extern volatile int res_track_memory; /* set this to zero to disable resource tracking */ 00036 00037 #define __RES_PATH(x) #x 00038 #define _RES_PATH(x) __RES_PATH (x) 00039 #define RES_PATH(x) x __FILE__ ":" _RES_PATH (__LINE__) 00040 00041 struct Resource 00042 { 00043 void *magic; 00044 struct Resource *next; 00045 const char *path; 00046 int64_t value; 00047 int64_t snapshot; 00048 int64_t baseline; 00049 }; 00050 00051 typedef struct Resource Resource; 00052 00053 #endif /* __INK_RESOURCE_H__ */