libnx
Data Structures | Enumerations | Functions
jit.h File Reference

Just-in-time compilation support. More...

#include "../types.h"

Go to the source code of this file.

Data Structures

struct  Jit
 JIT buffer object. More...
 

Enumerations

enum  JitType {
  JitType_CodeMemory,
  JitType_JitMemory
}
 JIT implementation type. More...
 

Functions

Result jitCreate (Jit *j, size_t size)
 Creates a JIT buffer. More...
 
Result jitTransitionToWritable (Jit *j)
 Transition a JIT buffer to have writable permission. More...
 
Result jitTransitionToExecutable (Jit *j)
 Transition a JIT buffer to have executable permission. More...
 
Result jitClose (Jit *j)
 Destroys a JIT buffer. More...
 
void * jitGetRwAddr (Jit *j)
 Gets the address of the writable memory alias of a JIT buffer. More...
 
void * jitGetRxAddr (Jit *j)
 Gets the address of the executable memory alias of a JIT buffer. More...
 

Detailed Description

Just-in-time compilation support.

Author
plutoo

Enumeration Type Documentation

enum JitType

JIT implementation type.

Enumerator
JitType_CodeMemory 

JIT supported using svcSetProcessMemoryPermission.

JitType_JitMemory 

JIT supported using 4.0.0+ JIT syscalls.

Function Documentation

Result jitClose ( Jit j)

Destroys a JIT buffer.

Parameters
jJIT buffer.
Returns
Result code.
Result jitCreate ( Jit j,
size_t  size 
)

Creates a JIT buffer.

Parameters
jJIT buffer.
sizeSize of the JIT buffer.
Returns
Result code.
void* jitGetRwAddr ( Jit j)

Gets the address of the writable memory alias of a JIT buffer.

Parameters
jJIT buffer.
Returns
Pointer to alias of the JIT buffer that can be written to.
void* jitGetRxAddr ( Jit j)

Gets the address of the executable memory alias of a JIT buffer.

Parameters
jJIT buffer.
Returns
Pointer to alias of the JIT buffer that can be executed.
Result jitTransitionToExecutable ( Jit j)

Transition a JIT buffer to have executable permission.

Parameters
jJIT buffer.
Returns
Result code.
Result jitTransitionToWritable ( Jit j)

Transition a JIT buffer to have writable permission.

Parameters
jJIT buffer.
Returns
Result code.