#include "rz_lib.h"
#include <stdio.h>
#include <stdlib.h>
#include "../io_memory.h"
Go to the source code of this file.
◆ __check()
Definition at line 9 of file io_malloc.c.
10 return (!strncmp(
pathname,
"malloc://", 9)) || (!strncmp(
pathname,
"hex://", 6));
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc static sig const char pathname
References pathname.
Referenced by __open().
◆ __open()
Definition at line 13 of file io_malloc.c.
19 if (!strncmp(
pathname,
"hex://", 6)) {
28 if ((
int)
mal->size < 1) {
33 if (((
int)
mal->size) <= 0) {
RZ_API void Ht_() free(HtName_(Ht) *ht)
static bool __check(RzIO *io, const char *pathname, bool many)
RzIOPlugin rz_io_plugin_malloc
void * calloc(size_t number, size_t size)
RZ_API int rz_hex_str2bin(const char *in, ut8 *out)
Convert an input string in into the binary form in out.
RZ_API RzIODesc * rz_io_desc_new(RzIO *io, RzIOPlugin *plugin, const char *uri, int flags, int mode, void *data)
RZ_API ut64 rz_num_math(RzNum *num, const char *str)
References __check(), calloc(), eprintf, free(), mal, NULL, pathname, RZ_FREE, rz_hex_str2bin(), rz_io_desc_new(), rz_io_plugin_malloc, RZ_NEW0, rz_num_math(), and RZ_PERM_RW.
◆ rizin_plugin
◆ rz_io_plugin_malloc
Initial value:= {
.name = "malloc",
.desc = "Memory allocation plugin",
.uris = "malloc://,hex://",
.license = "LGPL3",
}
static RzIODesc * __open(RzIO *io, const char *pathname, int rw, int mode)
bool io_memory_resize(RzIO *io, RzIODesc *fd, ut64 count)
int io_memory_read(RzIO *io, RzIODesc *fd, ut8 *buf, int count)
int io_memory_write(RzIO *io, RzIODesc *fd, const ut8 *buf, int count)
ut64 io_memory_lseek(RzIO *io, RzIODesc *fd, ut64 offset, int whence)
int io_memory_close(RzIODesc *fd)
Definition at line 50 of file io_malloc.c.
Referenced by __open().