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

Side by Side Diff: Source/platform/PODArena.h

Issue 131003004: Update platform classes to use OVERRIDE / FINAL when needed (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
« no previous file with comments | « no previous file | Source/platform/PODIntervalTree.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 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 // The Arena's default allocator, which uses fastMalloc and 58 // The Arena's default allocator, which uses fastMalloc and
59 // fastFree to allocate chunks of storage. 59 // fastFree to allocate chunks of storage.
60 class FastMallocAllocator : public Allocator { 60 class FastMallocAllocator : public Allocator {
61 public: 61 public:
62 static PassRefPtr<FastMallocAllocator> create() 62 static PassRefPtr<FastMallocAllocator> create()
63 { 63 {
64 return adoptRef(new FastMallocAllocator); 64 return adoptRef(new FastMallocAllocator);
65 } 65 }
66 66
67 virtual void* allocate(size_t size) { return fastMalloc(size); } 67 virtual void* allocate(size_t size) OVERRIDE { return fastMalloc(size); }
68 virtual void free(void* ptr) { fastFree(ptr); } 68 virtual void free(void* ptr) OVERRIDE { fastFree(ptr); }
69 69
70 protected: 70 protected:
71 FastMallocAllocator() { } 71 FastMallocAllocator() { }
72 }; 72 };
73 73
74 // Creates a new PODArena configured with a FastMallocAllocator. 74 // Creates a new PODArena configured with a FastMallocAllocator.
75 static PassRefPtr<PODArena> create() 75 static PassRefPtr<PODArena> create()
76 { 76 {
77 return adoptRef(new PODArena); 77 return adoptRef(new PODArena);
78 } 78 }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 RefPtr<Allocator> m_allocator; 192 RefPtr<Allocator> m_allocator;
193 Chunk* m_current; 193 Chunk* m_current;
194 size_t m_currentChunkSize; 194 size_t m_currentChunkSize;
195 Vector<OwnPtr<Chunk> > m_chunks; 195 Vector<OwnPtr<Chunk> > m_chunks;
196 }; 196 };
197 197
198 } // namespace WebCore 198 } // namespace WebCore
199 199
200 #endif // PODArena_h 200 #endif // PODArena_h
OLDNEW
« no previous file with comments | « no previous file | Source/platform/PODIntervalTree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698