Getting ready to shift to dlmalloc
This commit is contained in:
@@ -353,20 +353,6 @@ bool is_lua_comment(const std::string &s) {
|
||||
return s.substr(start, 2) == "--";
|
||||
}
|
||||
|
||||
int hash_of_mallocs() {
|
||||
void *blocks[15];
|
||||
int hash = 0;
|
||||
for (int i = 0; i < 15; i++) {
|
||||
void *blk = malloc(1 << i);
|
||||
blocks[i] = blk;
|
||||
hash = (hash * 17) + (int)(ptrdiff_t)(blk);
|
||||
}
|
||||
for (int i = 0; i < 15; i++) {
|
||||
free(blocks[i]);
|
||||
}
|
||||
return (hash & 0x7FFFFFFF) | (0x40000000);
|
||||
}
|
||||
|
||||
std::string XYZ::debug_string() const {
|
||||
std::ostringstream oss;
|
||||
oss << "(" << x << "," << y << "," << z << ")";
|
||||
|
||||
Reference in New Issue
Block a user