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

Side by Side Diff: src/allocation.cc

Issue 549079: Support for MIPS in architecture independent files.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 11 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
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 100
101 int NativeAllocationChecker::allocation_disallowed_ = 0; 101 int NativeAllocationChecker::allocation_disallowed_ = 0;
102 102
103 103
104 PreallocatedStorage PreallocatedStorage::in_use_list_(0); 104 PreallocatedStorage PreallocatedStorage::in_use_list_(0);
105 PreallocatedStorage PreallocatedStorage::free_list_(0); 105 PreallocatedStorage PreallocatedStorage::free_list_(0);
106 bool PreallocatedStorage::preallocated_ = false; 106 bool PreallocatedStorage::preallocated_ = false;
107 107
108 108
109 void PreallocatedStorage::Init(size_t size) { 109 void PreallocatedStorage::Init(size_t size) {
Søren Thygesen Gjesse 2010/01/19 22:59:12 Please revert this.
Alexandre 2010/01/22 23:08:42 Extra line deleted. On 2010/01/19 22:59:12, Søren
110
110 ASSERT(free_list_.next_ == &free_list_); 111 ASSERT(free_list_.next_ == &free_list_);
111 ASSERT(free_list_.previous_ == &free_list_); 112 ASSERT(free_list_.previous_ == &free_list_);
112 PreallocatedStorage* free_chunk = 113 PreallocatedStorage* free_chunk =
113 reinterpret_cast<PreallocatedStorage*>(new char[size]); 114 reinterpret_cast<PreallocatedStorage*>(new char[size]);
114 free_list_.next_ = free_list_.previous_ = free_chunk; 115 free_list_.next_ = free_list_.previous_ = free_chunk;
115 free_chunk->next_ = free_chunk->previous_ = &free_list_; 116 free_chunk->next_ = free_chunk->previous_ = &free_list_;
116 free_chunk->size_ = size - sizeof(PreallocatedStorage); 117 free_chunk->size_ = size - sizeof(PreallocatedStorage);
117 preallocated_ = true; 118 preallocated_ = true;
118 } 119 }
119 120
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 previous_->next_ = next_; 190 previous_->next_ = next_;
190 } 191 }
191 192
192 193
193 PreallocatedStorage::PreallocatedStorage(size_t size) 194 PreallocatedStorage::PreallocatedStorage(size_t size)
194 : size_(size) { 195 : size_(size) {
195 previous_ = next_ = this; 196 previous_ = next_ = this;
196 } 197 }
197 198
198 } } // namespace v8::internal 199 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698