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

Side by Side Diff: include/fletch_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/fletch_api.h ('k') | include/service_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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE.md file.
4
5 #ifndef INCLUDE_FLETCH_RELOCATION_API_H_
6 #define INCLUDE_FLETCH_RELOCATION_API_H_
7
8 #include <stdint.h>
9 #include <stddef.h>
10
11 #include "include/fletch_api.h"
12
13 // Returns the memory requirement in bytes for the given program. The
14 // reported memory requirement includes the size of an info block as
15 // appended when relocating a program. It is thus suitable as size
16 // argument to FletchRelocateProgram.
17 FLETCH_EXPORT size_t FletchGetProgramSize(FletchProgram program);
18
19 // Relocates the given program to the new address given by base.
20 // The resulting blob is written to the memory region referred to
21 // by target.
22 //
23 // base and target may coincide, if the new location of the program
24 // is in random access memory. Otherwise, the caller is responsible
25 // for copying the blob written to target to its new location.
26 //
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
29 // function FletchGetProgramSize can be used to query this information.
30 //
31 // The address referred to by base has to be 4k aligned.
32 //
33 // On success, the number of bytes written is returned. Otherwise,
34 // a negative value is returned.
35 FLETCH_EXPORT int FletchRelocateProgram(FletchProgram program,
36 void* target,
37 uintptr_t base);
38
39 #endif // INCLUDE_FLETCH_RELOCATION_API_H_
OLDNEW
« no previous file with comments | « include/fletch_api.h ('k') | include/service_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698