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

Side by Side Diff: src/vm/object_memory_test.cc

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 10 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
« no previous file with comments | « src/vm/object_memory_mark_sweep.cc ('k') | src/vm/object_test.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 (c) 2014, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dartino project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 #include "src/shared/assert.h" 5 #include "src/shared/assert.h"
6 #include "src/vm/heap.h" 6 #include "src/vm/heap.h"
7 #include "src/vm/object_memory.h" 7 #include "src/vm/object_memory.h"
8 #include "src/shared/test_case.h" 8 #include "src/shared/test_case.h"
9 9
10 namespace fletch { 10 namespace dartino {
11 11
12 static Chunk* AllocateChunkAndTestIt(SemiSpace* space) { 12 static Chunk* AllocateChunkAndTestIt(SemiSpace* space) {
13 // Allocate chunk. 13 // Allocate chunk.
14 Chunk* chunk = ObjectMemory::AllocateChunk(space, 4 * KB); 14 Chunk* chunk = ObjectMemory::AllocateChunk(space, 4 * KB);
15 EXPECT(chunk->base() != 0); 15 EXPECT(chunk->base() != 0);
16 16
17 // Write to the chunk and check the content. 17 // Write to the chunk and check the content.
18 char* chars = reinterpret_cast<char*>(chunk->base()); 18 char* chars = reinterpret_cast<char*>(chunk->base());
19 for (unsigned i = 0; i < chunk->size(); i++) { 19 for (unsigned i = 0; i < chunk->size(); i++) {
20 chars[i] = i % 128; 20 chars[i] = i % 128;
(...skipping 10 matching lines...) Expand all
31 Chunk* second = AllocateChunkAndTestIt(&space); 31 Chunk* second = AllocateChunkAndTestIt(&space);
32 32
33 // Compare. 33 // Compare.
34 EXPECT(first != second); 34 EXPECT(first != second);
35 35
36 // Free. 36 // Free.
37 ObjectMemory::FreeChunk(first); 37 ObjectMemory::FreeChunk(first);
38 ObjectMemory::FreeChunk(second); 38 ObjectMemory::FreeChunk(second);
39 } 39 }
40 40
41 } // namespace fletch 41 } // namespace dartino
OLDNEW
« no previous file with comments | « src/vm/object_memory_mark_sweep.cc ('k') | src/vm/object_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698