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

Side by Side Diff: include/dartino_relocation_api.h

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 | « include/dartino_api.h ('k') | include/fletch_api.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 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 #ifndef INCLUDE_FLETCH_RELOCATION_API_H_ 5 #ifndef INCLUDE_DARTINO_RELOCATION_API_H_
6 #define INCLUDE_FLETCH_RELOCATION_API_H_ 6 #define INCLUDE_DARTINO_RELOCATION_API_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 10
11 #include "include/fletch_api.h" 11 #include "include/dartino_api.h"
12 12
13 // Returns the memory requirement in bytes for the given program. The 13 // Returns the memory requirement in bytes for the given program. The
14 // reported memory requirement includes the size of an info block as 14 // reported memory requirement includes the size of an info block as
15 // appended when relocating a program. It is thus suitable as size 15 // appended when relocating a program. It is thus suitable as size
16 // argument to FletchRelocateProgram. 16 // argument to DartinoRelocateProgram.
17 FLETCH_EXPORT size_t FletchGetProgramSize(FletchProgram program); 17 DARTINO_EXPORT size_t DartinoGetProgramSize(DartinoProgram program);
18 18
19 // Relocates the given program to the new address given by base. 19 // Relocates the given program to the new address given by base.
20 // The resulting blob is written to the memory region referred to 20 // The resulting blob is written to the memory region referred to
21 // by target. 21 // by target.
22 // 22 //
23 // base and target may coincide, if the new location of the program 23 // base and target may coincide, if the new location of the program
24 // is in random access memory. Otherwise, the caller is responsible 24 // is in random access memory. Otherwise, the caller is responsible
25 // for copying the blob written to target to its new location. 25 // for copying the blob written to target to its new location.
26 // 26 //
27 // The memory region pointed to by target has to be big enough to 27 // The memory region pointed to by target has to be big enough to
28 // hold the relocated program plus an appended info block. The 28 // hold the relocated program plus an appended info block. The
29 // function FletchGetProgramSize can be used to query this information. 29 // function DartinoGetProgramSize can be used to query this information.
30 // 30 //
31 // The address referred to by base has to be 4k aligned. 31 // The address referred to by base has to be 4k aligned.
32 // 32 //
33 // On success, the number of bytes written is returned. Otherwise, 33 // On success, the number of bytes written is returned. Otherwise,
34 // a negative value is returned. 34 // a negative value is returned.
35 FLETCH_EXPORT int FletchRelocateProgram(FletchProgram program, 35 DARTINO_EXPORT int DartinoRelocateProgram(DartinoProgram program,
36 void* target, 36 void* target,
37 uintptr_t base); 37 uintptr_t base);
38 38
39 #endif // INCLUDE_FLETCH_RELOCATION_API_H_ 39 #endif // INCLUDE_DARTINO_RELOCATION_API_H_
OLDNEW
« no previous file with comments | « include/dartino_api.h ('k') | include/fletch_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698