Comments (1)
fix.
Maybe there are unused bytes remaining, inspired by:
//tcmalloc/testing/memory_errors_test.cc
// Eat up unsampled bytes remaining to flush the new sample rates.
while (true) {
void *p = ::operator new(kPageSize);
if (tcmalloc::Static::guardedpage_allocator()->PointerIsMine(p)) {
::operator delete(p);
break;
}
::operator delete(p);
}
fix test code :
#include <iostream>
#include "tcmalloc/malloc_extension.h"
int main() {
tcmalloc::MallocExtension::SetProfileSamplingRate(1);
tcmalloc::MallocExtension::SetGuardedSamplingRate(0);
tcmalloc::MallocExtension::ActivateGuardedSampling();
for (int i = 0; i < 100000; i++ ){
void *p = ::operator new(128);
::operator delete(p);
}
int64_t *cs = new int64_t[10];
delete[] cs;
cs[11] = 11;
return 0;
}
from tcmalloc.
Related Issues (20)
- segmentation fault when build with tsan HOT 2
- failed mater branch build on Fedora 38 HOT 1
- bazel build error
- MemoryLimit issue on CentOS
- OSS-Fuzz issue 63111
- OSS-Fuzz issue 63140
- OSS-Fuzz issue 63195 HOT 1
- Following QuickStart does not Build Successfully HOT 2
- tcmalloc central cache too large memory HOT 2
- Is there any release branch or tag of current project? HOT 2
- issue for "improve malloc fast path codegen" HOT 1
- Possibly crash with kernel disabling CONFIG_PROC_PID_CPUSET HOT 2
- tcmalloc is trying to keep everything allocated for longer HOT 3
- Disabling tcmalloc cache HOT 2
- OSS-Fuzz issue 65919 HOT 1
- OSS-Fuzz issue 66172 HOT 1
- MADV_COLLAPSE
- Failed to build tcmalloc, Error info: junk at end of line HOT 1
- Quick start guide broken
- How to access tcmalloc MallocExtensions? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tcmalloc.