![]() |
#1 |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Mar 2010
Location: Germany
Posts: 1,064
Reputation: 356
|
![]()
The PAWN memory access plugin allows to allocate and free memory from heap in PAWN.
Project All of the source code, builds and documentations are located at GitHub: https://github.com/BigETI/pawn-memory
|
![]() |
![]() |
![]() |
#2 |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Mar 2016
Location: Vikendi
Posts: 1,103
Reputation: 154
|
![]()
Good job! It'll be useful
|
![]() |
![]() |
![]() |
#3 |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jul 2016
Location: Brasil
Posts: 1,361
Reputation: 75
|
![]()
Nice job.
|
![]() |
![]() |
![]() |
#4 |
Beta Tester
![]() ![]() ![]() ![]() ![]() Join Date: Sep 2010
Location: Texas, USA.
Posts: 204
Reputation: 165
|
![]()
10/10 best plugin ever used.
|
![]() |
![]() |
![]() |
#5 |
Banned
![]() Join Date: May 2017
Location: Republic of Moldova
Posts: 123
Reputation: 43
|
![]()
nice plugin! ++
|
![]() |
![]() |
![]() |
#6 |
Banned
![]() Join Date: May 2011
Location: Russia
Posts: 3,334
Reputation: 824
|
![]()
I have weak knowledge in c, can it be explained what is the difference between managed and unmanaged if (anyway) I need to delete both of them to prevent memory leak?
|
![]() |
![]() |
![]() |
#7 |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Mar 2010
Location: Germany
Posts: 1,064
Reputation: 356
|
![]()
The concept of managed and unmanaged memory is not from C. Allocating managed memory in this context stores extra information such as the validity of a pointer and the size of the allocated block of memory. These information are used on calls to validate input, also on plugin unload all "managed" blocks of memory are freed back to the underlying system. Allocating unmanaged memory in this context doesn't really hold the information of the validity of a pointer, neither the size of the allocated block of memory. This concludes that the operations are faster, but they're prone to get misused by programmers, which then can mess up the working virtual memory space by using invalid pointers or overwriting blocks of memory that were not allocated, or used by different program code. Also "unmanaged" memory is not explicitly freed at plugin unload. The counterpart of MEM_new* and MEM_clone is MEM_delete, where the counterpart of MEM_UM_new* and MEM_UM_clone is MEM_UM_delete.
Last edited by BigETI; 22/11/2017 at 12:51 PM. |
![]() |
![]() |
![]() |
#8 |
Huge Clucker
![]() ![]() ![]() Join Date: Nov 2007
Location: Greenville, NC, USA
Posts: 473
Reputation: 156
|
![]()
What's the advantage of this over your old plugin? Why would I wanna allocate memory on the PAWN heap when I can do the same thing without messing with PAWN's heap in your other plugin?
|
![]() |
![]() |
![]() |
#9 |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Mar 2010
Location: Germany
Posts: 1,064
Reputation: 356
|
![]()
Memory is not allocated on PAWN heap memory. It is allocated on the application's heap memory.
|
![]() |
![]() |
![]() |
#10 |
Little Clucker
![]() Join Date: Jul 2017
Location: Cosmos
Posts: 26
Reputation: 1
|
![]()
How i get the .dll or .so file? or how can i setup this plugin?
Code:
[debug] Run time error 19: "File or function is not found" [debug] MEM_get_val [debug] MEM_get_size [debug] MEM_get_arr [debug] MEM_delete [debug] MEM_new_arr [debug] MEM_set_val [debug] Run time error 19: "File or function is not found" [debug] MEM_get_val [debug] MEM_get_size [debug] MEM_get_arr [debug] MEM_delete [debug] MEM_new_arr [debug] MEM_set_val |
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Plugin] Memory access plugin | BigETI | Plugin Development | 54 | 23/11/2017 04:23 PM |
Invalid Memory access | Dayrion | Scripting Help | 11 | 08/08/2016 07:35 PM |
How much random access memory | Manowar | Scripting Help | 5 | 05/03/2013 08:47 AM |
Invalid memory access | Littl3j0hNy | Scripting Help | 5 | 03/12/2011 04:51 PM |
Invalid memory access | wouter0100 | Scripting Help | 4 | 18/09/2011 12:28 AM |