Coder Social home page Coder Social logo

pawn-memory's Introduction

PAWN memory access plugin

sampctl package

Description

The PAWN memory access plugin allows to allocate and free memory from heap in PAWN. Detailed documentation can be checked out at the wiki.

Installation

Using sampctl

  1. Get sampctl from https://github.com/Southclaws/sampctl
  2. Install package using this command:
sampctl package install BigETI/pawn-memory
  1. Include library in your PAWN code
#include <memory>

Manually

  1. Move or copy the required files accordingly
  2. Include library in your PAWN code
#include <memory>

Dependencies

Documentation

The documentation is located at https://github.com/BigETI/pawn-memory/wiki

Licence

You can find the licence here: https://github.com/BigETI/pawn-memory/blob/master/LICENCE.md

How to contribute to this project?

Just create a fork out of this project, make your changes and create a pull request.

pawn-memory's People

Contributors

bigeti avatar dayvison avatar southclaws avatar ze8h avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pawn-memory's Issues

Curyllic character encoding

Hi, everybody!

I faced the problem of memory russian characters:

new string[24] = "Русский текст";

MEM_set_arr(ptr, 0, string, sizeof(string));
MEM_get_arr(ptr, 0, string, sizeof(string));

print(string); --> ������� �����

Can this be fixed in the next version?

Modernize project

  • Use CMake, as the dependency resolver, and build system
  • Upgrade to C++20 or newer
  • Utilize modern architectural design pattern
  • Replace the old way of declaring PAWN natives, with the usage of pawn-natives
  • Define GitHub actions, and runners, to build native libraries

Memory Leaks

Hi, if you are still maintaining this repo, I encountered some memory leaks by using your vectors and maps.

Failed To Load on Windows Server 2019

Have no issues with this plugin when running on Windows 11, but when I try to run the server on Windows Server 2019, both pawn-memory and streamer fail to load.

I have C++ 2015-2022 installed.

Error on CentOS 7

I got sth like this in server_log.txt /lib/libstdc++.so.6: version `CXXABI_1.3.8' not found
Please compile for CentOS 7

Not able to compile on Linux

Hello!

I'm not able to compile this plugin on Linux because your source/makefile requires GCC 4.9.x

[root@eu pawn-memory]# make
gcc -std=c++14 -c -m32 -fPIC -O3 -w -DLINUX -I./SDK/amx/ ./SDK/amx/*.c
gcc: error: unrecognized command line option ‘-std=c++14’
make: *** [all] Error 1

All of the boxes I have use GCC 4.8 and CentOS 6/7 mainstream only has GCC 4.8.

[root@eu pawn-memory]# gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)

I'm using the latest RHEL 7.x:

[root@eu pawn-memory]# cat /etc/*release* | grep -E 7.[0-9]+ | head -n 1
CentOS Linux release 7.4.1708 (Core)

I've already tried upgrading to GCC 4.9.x (which took ~45 minutes to compile GCC 4.9) on another server just to get it to compile, but ran into other issues:

[root@dal1 pawn-memory]# make
gcc -std=c++14 -c -m32 -fPIC -O3 -w -DLINUX -I./SDK/amx/ ./SDK/amx/*.c
g++ -std=c++14 -c -m32 -fPIC -O3 -w -DLINUX -I./SDK/amx/ ./SDK/*.cpp
g++ -std=c++14 -c -m32 -fPIC -O3 -w -DLINUX -I./SDK/amx/ ./*.cpp
g++ -m32 -O2 -fshort-wchar -shared -o "./memory.so" *.o
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/crtbeginS.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/crtendS.o' is incompatible with i386 output
collect2: error: ld returned 1 exit status
make: *** [all] Error 1

The reason why I want to recompile this plugin is because the .so we have already is compiled against another libstdc++ version that we don't have:

[05:30:27]   Failed (/lib/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by plugins/memory.so))

Any suggestions?

Segmentation Fault

Please refer to more details at the topic related to the issue at Incognito's repository.

P.S. Please do not consider me a douche or a troll; I might be not the only one with such an issue at hand. Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.