mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
Fix whitespace
This mostly deletes trailing spaces. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
parent
ddc9841019
commit
745a34f475
66 changed files with 760 additions and 769 deletions
|
@ -12,7 +12,7 @@ terms of the MIT license. A copy of the license can be found in the file
|
|||
> cmake ../.. -DMI_VALGRIND=1
|
||||
> make -j8
|
||||
|
||||
and then compile this file as:
|
||||
and then compile this file as:
|
||||
|
||||
> gcc -g -o test-wrong -I../../include ../../test/test-wrong.c libmimalloc-valgrind-debug.a -lpthread
|
||||
|
||||
|
@ -32,7 +32,7 @@ terms of the MIT license. A copy of the license can be found in the file
|
|||
|
||||
int main(int argc, char** argv) {
|
||||
int* p = (int*)mi(malloc)(3*sizeof(int));
|
||||
|
||||
|
||||
int* r = (int*)mi_malloc_aligned(8,16);
|
||||
mi_free(r);
|
||||
|
||||
|
@ -47,7 +47,7 @@ int main(int argc, char** argv) {
|
|||
|
||||
// illegal int read
|
||||
printf("invalid: over: %d, under: %d\n", q[1], q[-1]);
|
||||
|
||||
|
||||
*q = 42;
|
||||
|
||||
// buffer overflow
|
||||
|
@ -55,7 +55,7 @@ int main(int argc, char** argv) {
|
|||
|
||||
// buffer underflow
|
||||
q[-1] = 44;
|
||||
|
||||
|
||||
mi(free)(q);
|
||||
|
||||
// double free
|
||||
|
@ -66,5 +66,5 @@ int main(int argc, char** argv) {
|
|||
|
||||
// leak p
|
||||
// mi_free(p)
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue