OLD | NEW |
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 // See malloc.h for overview. | 5 // See malloc.h for overview. |
6 // | 6 // |
7 // TODO(rsc): double-check stats. | 7 // TODO(rsc): double-check stats. |
8 | 8 |
9 package runtime | 9 package runtime |
10 #include "runtime.h" | 10 #include "runtime.h" |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 } | 369 } |
370 nret = (nret + sizeof(void*)-1) & ~(sizeof(void*)-1); | 370 nret = (nret + sizeof(void*)-1) & ~(sizeof(void*)-1); |
371 | 371 |
372 if(getfinalizer(obj.data, 0)) { | 372 if(getfinalizer(obj.data, 0)) { |
373 printf("runtime.SetFinalizer: finalizer already set"); | 373 printf("runtime.SetFinalizer: finalizer already set"); |
374 goto throw; | 374 goto throw; |
375 } | 375 } |
376 } | 376 } |
377 addfinalizer(obj.data, finalizer.data, nret); | 377 addfinalizer(obj.data, finalizer.data, nret); |
378 } | 378 } |
OLD | NEW |