Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2)

Side by Side Diff: src/pkg/runtime/malloc.h

Issue 5191044: code review 5191044: runtime: fix spurious deadlock reporting (Closed)
Patch Set: diff -r ee8a3dd0f7c6 https://go.googlecode.com/hg/ Created 13 years, 5 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/pkg/runtime/mgc0.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // Memory allocator, based on tcmalloc. 5 // Memory allocator, based on tcmalloc.
6 // http://goog-perftools.sourceforge.net/doc/tcmalloc.html 6 // http://goog-perftools.sourceforge.net/doc/tcmalloc.html
7 7
8 // The main allocator works in runs of pages. 8 // The main allocator works in runs of pages.
9 // Small allocation sizes (up to and including 32 kB) are 9 // Small allocation sizes (up to and including 32 kB) are
10 // rounded to one of about 100 size classes, each of which 10 // rounded to one of about 100 size classes, each of which
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 enum 400 enum
401 { 401 {
402 // flags to malloc 402 // flags to malloc
403 FlagNoPointers = 1<<0, // no pointers here 403 FlagNoPointers = 1<<0, // no pointers here
404 FlagNoProfiling = 1<<1, // must not profile 404 FlagNoProfiling = 1<<1, // must not profile
405 FlagNoGC = 1<<2, // must not free or scan for pointers 405 FlagNoGC = 1<<2, // must not free or scan for pointers
406 }; 406 };
407 407
408 void runtime·MProf_Malloc(void*, uintptr); 408 void runtime·MProf_Malloc(void*, uintptr);
409 void runtime·MProf_Free(void*, uintptr); 409 void runtime·MProf_Free(void*, uintptr);
410 int32» runtime·helpgc(void); 410 int32» runtime·helpgc(bool*);
411 void runtime·gchelper(void); 411 void runtime·gchelper(void);
412 412
413 // Malloc profiling settings. 413 // Malloc profiling settings.
414 // Must match definition in extern.go. 414 // Must match definition in extern.go.
415 enum { 415 enum {
416 MProf_None = 0, 416 MProf_None = 0,
417 MProf_Sample = 1, 417 MProf_Sample = 1,
418 MProf_All = 2, 418 MProf_All = 2,
419 }; 419 };
420 extern int32 runtime·malloc_profile; 420 extern int32 runtime·malloc_profile;
421 421
422 typedef struct Finalizer Finalizer; 422 typedef struct Finalizer Finalizer;
423 struct Finalizer 423 struct Finalizer
424 { 424 {
425 Finalizer *next; // for use by caller of getfinalizer 425 Finalizer *next; // for use by caller of getfinalizer
426 void (*fn)(void*); 426 void (*fn)(void*);
427 void *arg; 427 void *arg;
428 int32 nret; 428 int32 nret;
429 }; 429 };
430 430
431 Finalizer* runtime·getfinalizer(void*, bool); 431 Finalizer* runtime·getfinalizer(void*, bool);
OLDNEW
« no previous file with comments | « no previous file | src/pkg/runtime/mgc0.c » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b