16.07.2013, 22:48
(
Last edited by BigETI; 23/11/2017 at 03:21 PM.
Reason: Obsolete release
)
memory.dll (Win32) / memory.so (Ubuntu 14.01 LTS, Debian 7 Wheezy) / memory.inc
Memory access plugin
The predecessor of https://sampforum.blast.hk/showthread.php?tid=645166
About
This plugin allows you to allocate dynamic memory, use it, and free it after you don't want to use it anymore.Memory access plugin
The predecessor of https://sampforum.blast.hk/showthread.php?tid=645166
About
Why?
PAWN literally doesn't allow you to manage dynamic memory at all. But still there has been releases such as for example y_malloc, which allows you to use dynamic memory in your PAWN scripts.Speed comparison between y_malloc and this plugin can be found here:
Allow your scripts to shrink their AMX sizes, by using dynamic memory.
Documentation
Setup
Put the plugin binary into your server's "plugins" folder and set in server.cfgWindows:
Code:
plugins memory
Code:
plugins memory.so
pawn Code:
// On top of your script
#include <memory>
// your code
Alternatively you can use the secure version (which is slower by a fraction):
Windows:
Code:
plugins memory_secure
Code:
plugins memory_secure.so
pawn Code:
// On top of your script
#define SECURE_MEMORY_PLUGIN
#include <memory>
// your code
Downloads
Quote:
Changelog
Quote:
|
Credits
If you are interested to compile this for Linux distributions, just let me know by personal messaging me and leave me links to download the compiled binar(y|ies).You'll be added into the credits, of course.
Quote:
|
Quote:
|
Best Regards
~ BigETI