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

Side by Side Diff: src/spaces.h

Issue 12314155: Allow direct allocation in old pointer space. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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/serialize.cc ('k') | src/x64/builtins-x64.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after
1656 1656
1657 // Wasted bytes in this space. These are just the bytes that were thrown away 1657 // Wasted bytes in this space. These are just the bytes that were thrown away
1658 // due to being too small to use for allocation. They do not include the 1658 // due to being too small to use for allocation. They do not include the
1659 // free bytes that were not found at all due to lazy sweeping. 1659 // free bytes that were not found at all due to lazy sweeping.
1660 virtual intptr_t Waste() { return accounting_stats_.Waste(); } 1660 virtual intptr_t Waste() { return accounting_stats_.Waste(); }
1661 1661
1662 // Returns the allocation pointer in this space. 1662 // Returns the allocation pointer in this space.
1663 Address top() { return allocation_info_.top; } 1663 Address top() { return allocation_info_.top; }
1664 Address limit() { return allocation_info_.limit; } 1664 Address limit() { return allocation_info_.limit; }
1665 1665
1666 // The allocation top and limit addresses.
1667 Address* allocation_top_address() { return &allocation_info_.top; }
1668 Address* allocation_limit_address() { return &allocation_info_.limit; }
1669
1666 // Allocate the requested number of bytes in the space if possible, return a 1670 // Allocate the requested number of bytes in the space if possible, return a
1667 // failure object if not. 1671 // failure object if not.
1668 MUST_USE_RESULT inline MaybeObject* AllocateRaw(int size_in_bytes); 1672 MUST_USE_RESULT inline MaybeObject* AllocateRaw(int size_in_bytes);
1669 1673
1670 virtual bool ReserveSpace(int bytes); 1674 virtual bool ReserveSpace(int bytes);
1671 1675
1672 // Give a block of memory to the space's free list. It might be added to 1676 // Give a block of memory to the space's free list. It might be added to
1673 // the free list or accounted as waste. 1677 // the free list or accounted as waste.
1674 // If add_to_freelist is false then just accounting stats are updated and 1678 // If add_to_freelist is false then just accounting stats are updated and
1675 // no attempt to add area to free list is made. 1679 // no attempt to add area to free list is made.
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
2827 } 2831 }
2828 // Must be small, since an iteration is used for lookup. 2832 // Must be small, since an iteration is used for lookup.
2829 static const int kMaxComments = 64; 2833 static const int kMaxComments = 64;
2830 }; 2834 };
2831 #endif 2835 #endif
2832 2836
2833 2837
2834 } } // namespace v8::internal 2838 } } // namespace v8::internal
2835 2839
2836 #endif // V8_SPACES_H_ 2840 #endif // V8_SPACES_H_
OLDNEW
« no previous file with comments | « src/serialize.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698