[Plugin] Memory access plugin
#1

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.



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.cfg

Windows:

Code:
plugins memory
LINUX:
Code:
plugins memory.so
After that you can use the memory include in your scripts:
pawn Code:
// On top of your script
#include <memory>
// your code
Compile and run.


Alternatively you can use the secure version (which is slower by a fraction):

Windows:

Code:
plugins memory_secure
LINUX:
Code:
plugins memory_secure.so
Of course you can use the memory include in your scripts:
pawn Code:
// On top of your script
#define SECURE_MEMORY_PLUGIN
#include <memory>
// your code
Compile and run.



Downloads

Changelog

Quote:
  • v1.1.1 -> Code optimization
  • v1.1 -> Added MEM_copy(), MEM_zero(), MEM_E_res (secure only), MEM_is() (secure only), MEM_len() (secure only), and MEM_result() (secure only) ( 17.10.2013 )
  • v1.0.01 -> Updated SDK and changed the includes ( 17.07.2013 )
  • v1.0 -> Initial release ( 17.07.2013 )
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:
  • BigETI for the source code and compiled binaries for Windows distributions and Ubuntu 14.01 LTS
  • Bluescreen for compiling the plugins for Debian 7 Wheezy
  • SA:MP development team
  • Y_Less for the speed comparison idea
Thanks for their previous support:
Quote:
  • leonardo1434
  • Josstaa
  • Mellnik
  • Tenshi
  • Mark™

Best Regards

~ BigETI
Reply


Messages In This Thread
[OBSOLETE] Memory access plugin - by BigETI - 16.07.2013, 22:48
Re: Memory access plugin - by Kitten - 16.07.2013, 22:53
Re: Memory access plugin - by RyDeR` - 16.07.2013, 22:55
Re: Memory access plugin - by Red_Dragon. - 17.07.2013, 01:25
Respuesta: Memory access plugin - by JustBored - 17.07.2013, 01:58
Re: Memory access plugin - by gtakillerIV - 17.07.2013, 02:25
Re: Memory access plugin - by leonardo1434 - 17.07.2013, 02:37
AW: Memory access plugin - by BigETI - 17.07.2013, 03:58
Re: AW: Memory access plugin - by leonardo1434 - 17.07.2013, 04:21
Re: Memory access plugin - by RajatPawar - 17.07.2013, 06:30
Re: Memory access plugin - by DRIFT_HUNTER - 16.01.2015, 22:07
AW: Memory access plugin - by BigETI - 16.01.2015, 23:10
Re: Memory access plugin - by DRIFT_HUNTER - 16.01.2015, 23:49
AW: Memory access plugin - by BigETI - 17.01.2015, 00:13
Re: Memory access plugin - by DRIFT_HUNTER - 17.01.2015, 00:21
Re: Memory access plugin - by AgusZ - 17.01.2015, 03:21
AW: Memory access plugin - by BigETI - 19.01.2015, 09:34
Re: Memory access plugin - by PaulDinam - 20.01.2015, 13:31
AW: Memory access plugin - by BigETI - 20.01.2015, 22:03
Re: AW: Memory access plugin - by PaulDinam - 20.01.2015, 22:13
AW: Memory access plugin - by BigETI - 20.01.2015, 22:26
Re: Memory access plugin - by PaulDinam - 20.01.2015, 23:39
AW: Memory access plugin - by BigETI - 21.01.2015, 00:03
Re: Memory access plugin - by PaulDinam - 21.01.2015, 00:25
AW: Memory access plugin - by BigETI - 21.01.2015, 09:11
Re: Memory access plugin - by PaulDinam - 23.01.2015, 17:26
AW: Memory access plugin - by BigETI - 23.01.2015, 17:59
Re: Memory access plugin - by PaulDinam - 23.01.2015, 23:16
Re: Memory access plugin - by WopsS - 03.02.2015, 00:13
Re: Memory access plugin - by Yousha - 16.09.2017, 12:45
Re: Memory access plugin - by DimaShift - 30.09.2017, 07:02
Re: Memory access plugin - by BigETI - 05.10.2017, 05:16
Re: Memory access plugin - by DimaShift - 16.10.2017, 16:20
[OBSOLETE] Memory access plugin - by BigETI - 23.11.2017, 15:23

Forum Jump:


Users browsing this thread: 2 Guest(s)