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

Side by Side Diff: runtime/bin/dfe.cc

Issue 3000623002: [kernel] Free memory for kernel data. (Closed)
Patch Set: Remove commented out code Created 3 years, 4 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
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart 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 file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "bin/dfe.h" 5 #include "bin/dfe.h"
6 #include "bin/dartutils.h" 6 #include "bin/dartutils.h"
7 #include "bin/error_exit.h" 7 #include "bin/error_exit.h"
8 #include "bin/file.h" 8 #include "bin/file.h"
9 9
10 #include "vm/kernel.h" 10 #include "vm/kernel.h"
(...skipping 24 matching lines...) Expand all
35 delete reinterpret_cast<kernel::Program*>(kernel_platform_); 35 delete reinterpret_cast<kernel::Program*>(kernel_platform_);
36 kernel_platform_ = NULL; 36 kernel_platform_ = NULL;
37 } 37 }
38 38
39 if (kernel_vmservice_io_ != NULL) { 39 if (kernel_vmservice_io_ != NULL) {
40 delete reinterpret_cast<kernel::Program*>(kernel_vmservice_io_); 40 delete reinterpret_cast<kernel::Program*>(kernel_vmservice_io_);
41 kernel_vmservice_io_ = NULL; 41 kernel_vmservice_io_ = NULL;
42 } 42 }
43 } 43 }
44 44
45 void DFE::unset_kernel_vmservice_io() {
Kevin Millikin (Google) 2017/08/14 06:20:50 "unset" isn't really a word. Usually "clear" is t
jensj 2017/08/14 08:38:12 Renaming to 'clear_kernel_vmservice_io' as I find
46 kernel_vmservice_io_ = NULL;
47 }
48
45 void DFE::SetKernelBinaries(const char* name) { 49 void DFE::SetKernelBinaries(const char* name) {
46 intptr_t len = snprintf(NULL, 0, "%s%s%s", name, File::PathSeparator(), 50 intptr_t len = snprintf(NULL, 0, "%s%s%s", name, File::PathSeparator(),
47 kPlatformBinaryName) + 51 kPlatformBinaryName) +
48 1; 52 1;
49 platform_binary_filename_ = new char[len]; 53 platform_binary_filename_ = new char[len];
50 snprintf(platform_binary_filename_, len, "%s%s%s", name, 54 snprintf(platform_binary_filename_, len, "%s%s%s", name,
51 File::PathSeparator(), kPlatformBinaryName); 55 File::PathSeparator(), kPlatformBinaryName);
52 56
53 len = snprintf(NULL, 0, "%s%s%s", name, File::PathSeparator(), 57 len = snprintf(NULL, 0, "%s%s%s", name, File::PathSeparator(),
54 kVMServiceIOBinaryName) + 58 kVMServiceIOBinaryName) +
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 *kernel_ir = buffer; 164 *kernel_ir = buffer;
161 return true; 165 return true;
162 } 166 }
163 } 167 }
164 } 168 }
165 return false; 169 return false;
166 } 170 }
167 171
168 } // namespace bin 172 } // namespace bin
169 } // namespace dart 173 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/dfe.h ('k') | runtime/bin/main.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698