git-svn-id: svn://db.shs.com.ru/pip@804 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2019-06-22 20:37:09 +00:00
parent fb44b01c0f
commit 1f527d8e14
12 changed files with 110 additions and 42 deletions

View File

@@ -30,6 +30,7 @@ PIIntrospectionContainers::Type::Type() {
PIIntrospectionContainers::PIIntrospectionContainers() {
//printf("PIIntrospectionContainers %p\n", this);
crc = standardCRC_32();
}
@@ -51,24 +52,32 @@ void PIIntrospectionContainers::containerDelete(const char * tn) {
void PIIntrospectionContainers::containerAlloc(const char * tn, ullong cnt) {
//printf(" alloc %s %d\n", tn, cnt);
if (cnt == 0) return;
PIMutexLocker _ml(mutex);
data[typeID(tn)].bytes_allocated += cnt;
}
void PIIntrospectionContainers::containerFree(const char * tn, ullong cnt) {
//printf(" free %s %d\n", tn, cnt);
if (cnt == 0) return;
PIMutexLocker _ml(mutex);
data[typeID(tn)].bytes_allocated -= cnt;
}
void PIIntrospectionContainers::containerUsed(const char * tn, ullong cnt) {
//printf(" used %s %d\n", tn, cnt);
if (cnt == 0) return;
PIMutexLocker _ml(mutex);
data[typeID(tn)].bytes_used += cnt;
}
void PIIntrospectionContainers::containerUnused(const char * tn, ullong cnt) {
//printf("unused %s %d\n", tn, cnt);
if (cnt == 0) return;
PIMutexLocker _ml(mutex);
data[typeID(tn)].bytes_used -= cnt;
}