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

Side by Side Diff: src/untrusted/irt/irt_malloc.c

Issue 12209042: Ensure syscall functions are consistently prefixed with "NaClSys" (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/trusted/service_runtime/nacl_text.c ('k') | src/untrusted/irt/irt_memory.c » ('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) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* 7 /*
8 * This provides a private allocator to be used only within the IRT. 8 * This provides a private allocator to be used only within the IRT.
9 * This is distinct from the user application's allocators. This 9 * This is distinct from the user application's allocators. This
10 * allocator cannot use sbrk (the NaCl sysbrk syscall), which is 10 * allocator cannot use sbrk (the NaCl brk syscall), which is reserved
11 * reserved for the user application. 11 * for the user application.
12 * 12 *
13 * NOTE: However, this allocator is exposed to PPAPI applications via the 13 * NOTE: However, this allocator is exposed to PPAPI applications via the
14 * PPB_Core MemAlloc and MemFree function pointers. That should go away. 14 * PPB_Core MemAlloc and MemFree function pointers. That should go away.
15 * See http://code.google.com/p/chromium/issues/detail?id=80610 15 * See http://code.google.com/p/chromium/issues/detail?id=80610
16 */ 16 */
17 17
18 #include <errno.h> 18 #include <errno.h>
19 #include <pthread.h> 19 #include <pthread.h>
20 #include <unistd.h> 20 #include <unistd.h>
21 21
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 /* 80 /*
81 * This must never be called. It's here to catch any stray calls. 81 * This must never be called. It's here to catch any stray calls.
82 */ 82 */
83 void *sbrk(intptr_t increment) { 83 void *sbrk(intptr_t increment) {
84 static const char msg[] = "BUG! IRT code called sbrk\n"; 84 static const char msg[] = "BUG! IRT code called sbrk\n";
85 write(2, msg, sizeof(msg) - 1); 85 write(2, msg, sizeof(msg) - 1);
86 _exit(-1); 86 _exit(-1);
87 return NULL; 87 return NULL;
88 } 88 }
OLDNEW
« no previous file with comments | « src/trusted/service_runtime/nacl_text.c ('k') | src/untrusted/irt/irt_memory.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698