Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: src/mark-compact.cc

Issue 181833004: Fix memory leak caused by treating Code::next_code_link as strong in marker. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix constant Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/heap.cc ('k') | src/objects.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1842 matching lines...) Expand 10 before | Expand all | Expand 10 after
1853 : collector_(heap->mark_compact_collector()) { } 1853 : collector_(heap->mark_compact_collector()) { }
1854 1854
1855 void VisitPointer(Object** p) { 1855 void VisitPointer(Object** p) {
1856 MarkObjectByPointer(p); 1856 MarkObjectByPointer(p);
1857 } 1857 }
1858 1858
1859 void VisitPointers(Object** start, Object** end) { 1859 void VisitPointers(Object** start, Object** end) {
1860 for (Object** p = start; p < end; p++) MarkObjectByPointer(p); 1860 for (Object** p = start; p < end; p++) MarkObjectByPointer(p);
1861 } 1861 }
1862 1862
1863 // Skip the weak next code link in a code object.
1864 void VisitNextCodeLink(Object** p) { }
Michael Starzinger 2014/03/06 13:43:52 This should actually be unreachable, because there
ulan 2014/03/13 14:06:52 As discussed offline, this is called in ProcessTop
1865
1863 private: 1866 private:
1864 void MarkObjectByPointer(Object** p) { 1867 void MarkObjectByPointer(Object** p) {
1865 if (!(*p)->IsHeapObject()) return; 1868 if (!(*p)->IsHeapObject()) return;
1866 1869
1867 // Replace flat cons strings in place. 1870 // Replace flat cons strings in place.
1868 HeapObject* object = ShortCircuitConsString(p); 1871 HeapObject* object = ShortCircuitConsString(p);
1869 MarkBit mark_bit = Marking::MarkBitFrom(object); 1872 MarkBit mark_bit = Marking::MarkBitFrom(object);
1870 if (mark_bit.Get()) return; 1873 if (mark_bit.Get()) return;
1871 1874
1872 Map* map = object->map(); 1875 Map* map = object->map();
(...skipping 2604 matching lines...) Expand 10 before | Expand all | Expand 10 after
4477 while (buffer != NULL) { 4480 while (buffer != NULL) {
4478 SlotsBuffer* next_buffer = buffer->next(); 4481 SlotsBuffer* next_buffer = buffer->next();
4479 DeallocateBuffer(buffer); 4482 DeallocateBuffer(buffer);
4480 buffer = next_buffer; 4483 buffer = next_buffer;
4481 } 4484 }
4482 *buffer_address = NULL; 4485 *buffer_address = NULL;
4483 } 4486 }
4484 4487
4485 4488
4486 } } // namespace v8::internal 4489 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698