Contains helper functions used by VMs and the host app.
More...
#include <public/sourcepawn/sp_vm_api.h>
List of all members.
Public Member Functions |
| virtual sp_plugin_t * | LoadFromFilePointer (FILE *fp, int *err)=0 |
| | Deprecated, do not use.
|
| virtual sp_plugin_t * | LoadFromMemory (void *base, sp_plugin_t *plugin, int *err)=0 |
| | Deprecated, do not use,.
|
| virtual int | FreeFromMemory (sp_plugin_t *plugin)=0 |
| | Deprecated, do not use.
|
| virtual void * | BaseAlloc (size_t size)=0 |
| | Allocates large blocks of temporary memory.
|
| virtual void | BaseFree (void *memory)=0 |
| | Frees memory allocated with BaseAlloc.
|
| virtual void * | ExecAlloc (size_t size)=0 |
| | Allocates executable memory.
|
| virtual void | ExecFree (void *address)=0 |
| | Frees executable memory.
|
| virtual IDebugListener * | SetDebugListener (IDebugListener *listener)=0 |
| | Sets the debug listener. This should only be called once. If called successively (using manual chaining), only the last function should attempt to call back into the same plugin. Otherwise, globally cached states can be accidentally overwritten.
|
| virtual unsigned int | GetContextCallCount ()=0 |
| | Deprecated, do not use.
|
| virtual unsigned int | GetEngineAPIVersion ()=0 |
| | Returns the engine API version.
|
| virtual void * | AllocatePageMemory (size_t size)=0 |
| | Allocates executable memory.
|
| virtual void | SetReadWrite (void *ptr)=0 |
| | Sets the input memory permissions to read+write.
|
| virtual void | SetReadExecute (void *ptr)=0 |
| | Sets the input memory permissions to read+execute.
|
| virtual void | FreePageMemory (void *ptr)=0 |
| | Frees executable memory.
|
Detailed Description
Contains helper functions used by VMs and the host app.
Definition at line 1050 of file sp_vm_api.h.
Member Function Documentation
| virtual sp_plugin_t* SourcePawn::ISourcePawnEngine::LoadFromFilePointer |
( |
FILE * |
fp, |
|
|
int * |
err | |
|
) |
| | [pure virtual] |
Deprecated, do not use.
- Parameters:
-
- Returns:
- NULL.
| virtual sp_plugin_t* SourcePawn::ISourcePawnEngine::LoadFromMemory |
( |
void * |
base, |
|
|
sp_plugin_t * |
plugin, |
|
|
int * |
err | |
|
) |
| | [pure virtual] |
Deprecated, do not use,.
- Parameters:
-
| base | Unused. |
| plugin | Unused. |
| err | Unused. |
- Returns:
- NULL.
| virtual int SourcePawn::ISourcePawnEngine::FreeFromMemory |
( |
sp_plugin_t * |
plugin |
) |
[pure virtual] |
Deprecated, do not use.
- Parameters:
-
- Returns:
- SP_ERROR_ABORTED.
| virtual void* SourcePawn::ISourcePawnEngine::BaseAlloc |
( |
size_t |
size |
) |
[pure virtual] |
Allocates large blocks of temporary memory.
- Parameters:
-
| size | Size of memory to allocate. |
- Returns:
- Pointer to memory, NULL if allocation failed.
| virtual void SourcePawn::ISourcePawnEngine::BaseFree |
( |
void * |
memory |
) |
[pure virtual] |
Frees memory allocated with BaseAlloc.
- Parameters:
-
| memory | Memory address to free. |
| virtual void* SourcePawn::ISourcePawnEngine::ExecAlloc |
( |
size_t |
size |
) |
[pure virtual] |
Allocates executable memory.
- Deprecated:
- Use AllocPageMemory()
- Parameters:
-
| size | Size of memory to allocate. |
- Returns:
- Pointer to memory, NULL if allocation failed.
| virtual void SourcePawn::ISourcePawnEngine::ExecFree |
( |
void * |
address |
) |
[pure virtual] |
Sets the debug listener. This should only be called once. If called successively (using manual chaining), only the last function should attempt to call back into the same plugin. Otherwise, globally cached states can be accidentally overwritten.
- Parameters:
-
- Returns:
- Old IDebugListener, or NULL if none.
| virtual unsigned int SourcePawn::ISourcePawnEngine::GetContextCallCount |
( |
|
) |
[pure virtual] |
Deprecated, do not use.
- Returns:
- 0.
| virtual unsigned int SourcePawn::ISourcePawnEngine::GetEngineAPIVersion |
( |
|
) |
[pure virtual] |
Returns the engine API version.
- Returns:
- Engine API version.
| virtual void* SourcePawn::ISourcePawnEngine::AllocatePageMemory |
( |
size_t |
size |
) |
[pure virtual] |
Allocates executable memory.
- Parameters:
-
| size | Size of memory to allocate. |
- Returns:
- Pointer to memory, NULL if allocation failed.
| virtual void SourcePawn::ISourcePawnEngine::SetReadWrite |
( |
void * |
ptr |
) |
[pure virtual] |
Sets the input memory permissions to read+write.
- Parameters:
-
| virtual void SourcePawn::ISourcePawnEngine::SetReadExecute |
( |
void * |
ptr |
) |
[pure virtual] |
Sets the input memory permissions to read+execute.
- Parameters:
-
| virtual void SourcePawn::ISourcePawnEngine::FreePageMemory |
( |
void * |
ptr |
) |
[pure virtual] |
Frees executable memory.
- Parameters:
-
The documentation for this class was generated from the following file: