SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 27/02/2018, 05:02 AM   #11
iKarim
Gangsta
 
iKarim's Avatar
 
Join Date: Oct 2015
Posts: 586
Reputation: 130
Default Re: PAWN memory access plugin

Quote:
Originally Posted by DavidZvla View Post
How i get the .dll or .so file? or how can i setup this plugin?
https://github.com/BigETI/pawn-memory/releases
iKarim is offline   Reply With Quote
Old 22/03/2018, 03:18 PM   #12
v1k1nG
Little Clucker
 
v1k1nG's Avatar
 
Join Date: Feb 2018
Posts: 43
Reputation: 3
Default Re: PAWN memory access plugin

Hey! I can feel the power of this plugin, yet not all of us are so geeks to simply understand it all by ourselves. Since you decided to share your work, more details about it would be appreciated.
__________________
v1k1nG is offline   Reply With Quote
Old 22/03/2018, 03:33 PM   #13
Ritzy
High-roller
 
Ritzy's Avatar
 
Join Date: Jun 2014
Posts: 1,699
Reputation: 168
Default Re: PAWN memory access plugin

Quote:
Originally Posted by v1k1nG View Post
Hey! I can feel the power of this plugin, yet not all of us are so geeks to simply understand it all by ourselves. Since you decided to share your work, more details about it would be appreciated.
It doesn’t take too much to read, the thread mentions that it’s a successor for a previous version you can simply read that thread for documentation purposes.
__________________
Ritzy is offline   Reply With Quote
Old 22/03/2018, 03:52 PM   #14
v1k1nG
Little Clucker
 
v1k1nG's Avatar
 
Join Date: Feb 2018
Posts: 43
Reputation: 3
Default Re: PAWN memory access plugin

Quote:
Originally Posted by Ritzy View Post
It doesn’t take too much to read, the thread mentions that it’s a successor for a previous version you can simply read that thread for documentation purposes.
True, but I could be so noob and new that I may be ignoring such habits, and then simply think that I can't understand anything of this because I am so stupid and start thinking that coding is not for me, and only thing I can do is to harvest crops for a living. Sharing means caring too I guess. Note that I don't wanna be a pain in the ass, I was just suggesting to make the thread more user-friendly
__________________
v1k1nG is offline   Reply With Quote
Old 22/03/2018, 07:59 PM   #15
BigETI
Gangsta
 
BigETI's Avatar
 
Join Date: Mar 2010
Location: Germany
Posts: 965
Reputation: 266
Default Re: PAWN memory access plugin

The documentation of the previous release is completly deprecated. Again everything you need is at the pawn-memory GitHub page.
BigETI is offline   Reply With Quote
Old 23/03/2018, 03:34 PM   #16
Kaperstone
High-roller
 
Kaperstone's Avatar
 
Join Date: May 2011
Location: Russia
Posts: 3,338
Reputation: 818
Default Re: PAWN memory access plugin

Quote:
Originally Posted by v1k1nG View Post
True, but I could be so noob and new that I may be ignoring such habits, and then simply think that I can't understand anything of this because I am so stupid and start thinking that coding is not for me, and only thing I can do is to harvest crops for a living. Sharing means caring too I guess. Note that I don't wanna be a pain in the ass, I was just suggesting to make the thread more user-friendly
It is really simple, register information outside of PAWN - create, use, add, clone, remove, free information. (everything is dynamic, no need to specify sizes and your .amx file will also be smaller, ain't sure about compilation time, I think its also shorter because less calculations of Pawn's heap size and less allocation?)


Basic information from the older version of this plugin wasn't transferred to this thread and indeed very little information was added to describe `why in the hell would I need this plugin and why it exists`

But you might not even need this, in fact, I would actually recommend to not use it if you did not read about it before.
Not knowing what you do can make you a victim of memory leak.


This plugin can be useful if you have large lists, in need of dynamic arrays, just don't want the memory to be calculated on Pawn's heap.
Ain't sure about advanced memory manipulation tho, but with this plugin you can store even bigger data using linked lists (wiki)

But just remember that it is slower than using regular variables/arrays, so this might not be a drop-in solution for everything.


EDIT: you can read about this plugin more here
http://forum.sa-mp.com/showthread.php?t=477809
__________________
Find me on GitHubSEF Community (Official NEF Successor) • SA:MP ReviewsFind me on Steam

Last edited by Kaperstone; 23/03/2018 at 07:43 PM.
Kaperstone is offline   Reply With Quote
Old 24/03/2018, 08:06 AM   #17
BigETI
Gangsta
 
BigETI's Avatar
 
Join Date: Mar 2010
Location: Germany
Posts: 965
Reputation: 266
Default Re: PAWN memory access plugin

Fast compilation and reduced AMX size was not the goal of this plugin. This plugin simply allows you to allocate and free blocks of memory in runtime, that being said if you have a situation where you need to store "n" amount of cells, where "n" is indeterminate at compilation, this is where you want to allocate in runtime. That is the side effect of reducing AMX sizes. If you use this plugin properly, you don't need to do a workaround for allocating indeterminate array sizes at compilation by using very large arrays. C allocation itself is very fast, and any application that depends on indeterminate memory allocation at compilation (even the AMX virtual machine itself) uses C allocation internally. The reason why this plugin exists alogside its first iteration is because it fixes many use issues with secure memory allocation and user experience by introducing a way better syntax, explained in its documentation. The first iteration still exists because of compatibility reasons for older scripts.

About that tutorial, this was written for the first iteration of the plugin alongside a version of linked lists, which only runs on the first iteration of the plugin, which should be avoided completly.
http://forum.sa-mp.com/showthread.php?t=645193 and http://forum.sa-mp.com/showthread.php?t=645194 are releases that work with the second plugin iteration.
BigETI is offline   Reply With Quote
Old 24/03/2018, 10:20 AM   #18
Locky_
High-roller
 
Join Date: Jul 2012
Posts: 1,554
Reputation: 311
Default Re: PAWN memory access plugin

Error on Linux CentOS 7. :/

Code:
/lib/libstdc++.so.6: version `CXXABI_1.3.8' not found
#Edit
I compiled the plugin by CentOS (7) itself and it is now functional.
For others needing it, attach a compiled version of the plugin.
Attached Files
File Type: zip pawn-memory.zip (13.3 KB, 6 views)

Last edited by Locky_; 24/03/2018 at 11:30 AM.
Locky_ is offline   Reply With Quote
Old 24/03/2018, 12:03 PM   #19
BigETI
Gangsta
 
BigETI's Avatar
 
Join Date: Mar 2010
Location: Germany
Posts: 965
Reputation: 266
Default Re: PAWN memory access plugin

It would be interesting to know what libstdc++ version is used at your build.

Edit: Your build is now included at GitHub, thank you.
BigETI is offline   Reply With Quote
Old 30/03/2018, 07:04 PM   #20
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,707
Reputation: 772
Default Re: PAWN memory access plugin

There should be a "MEM_realloc" function.
__________________
Gammix is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] Memory access plugin BigETI Plugin Development 54 23/11/2017 03:23 PM
Invalid Memory access Dayrion Scripting Help 11 08/08/2016 06:35 PM
How much random access memory Manowar Scripting Help 5 05/03/2013 07:47 AM
Invalid memory access Littl3j0hNy Scripting Help 5 03/12/2011 03:51 PM
Invalid memory access wouter0100 Scripting Help 4 17/09/2011 11:28 PM


All times are GMT. The time now is 04:41 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.