search for: lmalloc

Displaying 20 results from an estimated 37 matches for "lmalloc".

Did you mean: kmalloc
2011 Jan 03
1
[PATCH] COM32R documentation: fix typo 'pm_cs'
...iles changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/comboot.txt b/doc/comboot.txt index 4b4b880..04d5deb 100644 --- a/doc/comboot.txt +++ b/doc/comboot.txt @@ -986,27 +986,27 @@ AX=0024h [3.80] Cleanup, shuffle and boot, raw version ++++ 32-BIT ONLY API CALLS ++++ -void *pm_cs->lmalloc(size_t bytes) +void *cs_pm->lmalloc(size_t bytes) Allocate a buffer in low memory (below 1 MB). -void pm_cs->lfree(void *ptr) +void cs_pm->lfree(void *ptr) - Free a buffer allocated with pm_cs->lmalloc(). + Free a buffer allocated with cs_pm->lmalloc(). -DIR *pm_cs->op...
2011 Feb 16
1
[PATCH] [RESEND] COM32R documentation: fix typo 'pm_cs'
...iles changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/comboot.txt b/doc/comboot.txt index 4b4b880..04d5deb 100644 --- a/doc/comboot.txt +++ b/doc/comboot.txt @@ -986,27 +986,27 @@ AX=0024h [3.80] Cleanup, shuffle and boot, raw version ++++ 32-BIT ONLY API CALLS ++++ -void *pm_cs->lmalloc(size_t bytes) +void *cs_pm->lmalloc(size_t bytes) Allocate a buffer in low memory (below 1 MB). -void pm_cs->lfree(void *ptr) +void cs_pm->lfree(void *ptr) - Free a buffer allocated with pm_cs->lmalloc(). + Free a buffer allocated with cs_pm->lmalloc(). -DIR *pm_cs->op...
2013 Sep 17
2
[PATCH 1/4 v2] com32/lib/: Avoid unneeded allocation.
...sys_t inreg, outreg; - struct disk_ebios_eparam *eparam; + struct disk_ebios_eparam *eparam = NULL; int rv = 0; memset(diskinfo, 0, sizeof *diskinfo); @@ -94,12 +94,12 @@ int disk_get_params(int disk, struct disk_info *const diskinfo) diskinfo->ebios = 1; } - eparam = lmalloc(sizeof *eparam); - if (!eparam) - return -1; - /* Get extended disk parameters if ebios == 1 */ if (diskinfo->ebios) { + eparam = lmalloc(sizeof *eparam); + if (!eparam) + return -1; + memset(&inreg, 0, sizeof inreg); inreg.eax.b[1] = 0x48; inreg.edx.b[0] = disk; -- 1....
2015 Jan 11
1
SysLinux Development Questions
...s COM32 modules as they run in 32bit mode and malloc returns 32bit memory allocations. However when the 64bit uefi build pass runs there are multiple warnings about forcing pointers into 32bit fields and I would also assume that malloc is free to return storage above the 32bit addressable range. Is lmalloc the solution to keeping allocated memory in 32bit addressable storage? A grep gives me HEAP_LOWMEM parameter for lmalloc but that is just an enum without explanation and I can't see how/where this changes the memory allocation in malloc.c Syslinux shared libraries: As part of the PBA process...
2013 Sep 06
1
[PATCH 2/2] com32/disk: Improve flow at disk_write_sectors and disk_read_sectors.
...6 +167,79 @@ out: } /** + * Fill inreg based on EBIOS addressing properties. + * + * @v diskinfo The disk drive to read from + * @v inreg Register data structure to be filled. + * @v lba The logical block address to begin reading at + * @v count The number of sectors to read + * @ret lmalloc'd buf upon success, NULL upon failure + */ +static void *ebios_disk_op(const struct disk_info *const diskinfo, + com32sys_t *inreg, uint64_t lba, uint8_t count) +{ + static struct disk_ebios_dapa dapa; + void *buf; + + buf = lmalloc(count * diskinfo->bps); + if (!buf) +...
2012 Jun 26
2
[GIT PULL] elflink bug fixes
...ruct disk_info *di, uint64_t lba, uint32_t m uint32_t get_file_lba(const char *filename) { com32sys_t inregs; - uint32_t lba; + uint32_t lba = 0; + int size = 65536; + char *buf; /* Start with clean registers */ memset(&inregs, 0, sizeof(com32sys_t)); + buf = lmalloc(size); + if (!buf) + return 0; + /* Put the filename in the bounce buffer */ - strlcpy(__com32.cs_bounce, filename, __com32.cs_bounce_size); + strlcpy(buf, filename, size); /* Call comapi_open() which returns a structure pointer in SI * to a structure whose first member h...
2013 Sep 06
1
[PATCH 2/2 v2] com32/disk: Improve flow at disk_write_sectors and disk_read_sectors.
...6 +160,81 @@ out: } /** + * Fill inreg based on EBIOS addressing properties. + * + * @v diskinfo The disk drive to read from + * @v inreg Register data structure to be filled. + * @v lba The logical block address to begin reading at + * @v count The number of sectors to read + * @ret lmalloc'd buf upon success, NULL upon failure + */ +static inline void * +ebios_disk_op(const struct disk_info *const diskinfo, + com32sys_t *inreg, uint64_t lba, uint8_t count) +{ + static struct disk_ebios_dapa dapa; + void *buf; + + buf = lmalloc(count * diskinfo->bps); + i...
2008 Aug 06
1
pid$target::malloc:entry does not work
In Solaris 10 6/06, etc. I used to do things like pid$target::malloc:entry { ustack(); } and got stack traces from my application calling malloc as expected. In Solaris 10 8/07 I only see stack traces from functions inside libc calling a function called lmalloc() but not my malloc calls: ld.so.1`lmalloc ld.so.1`tsort+0xb4 ld.so.1`load_completion+0x7c ld.so.1`elf_bndr+0x3d8 ld.so.1`elf_rtbndr+0x10 libc.so.1`0xff36f30c libc.so.1`_ndoprnt+0x32c...
2013 Oct 17
1
[PATCH] chain: Fix chainloading on 6.02
From: Raphael S. Carvalho <raphael.scarv at gmail.com> My commit 09f4ac33 broke 'com32/lib/syslinux/disk.c' __lowmem doesn't work for declarations outside the core. Using __lowmem outside the core wouldn't have the desired effect, then lmalloc must be used instead to store dapa into the correct section (".lowmem"). Reported-by: Dark Raven <drdarkraven at gmail.com> Signed-off-by: Raphael S. Carvalho <raphael.scarv at gmail.com> --- com32/lib/syslinux/disk.c | 22 ++++++++++++++-------- 1 files changed, 14 insert...
2013 Sep 17
1
[PATCH 2/4 v3] com32/disk: Code cleanup at disk_write_sectors and disk_read_sectors.
...ed on EBIOS addressing properties. + * + * @v diskinfo The disk drive to read from + * @v inreg Register data structure to be filled. + * @v lba The logical block address to begin reading at + * @v count The number of sectors to read + * @v op_code Code to write/read operation + * @ret lmalloc'd buf upon success, NULL upon failure + */ +static void *ebios_setup(const struct disk_info *const diskinfo, com32sys_t *inreg, + uint64_t lba, uint8_t count, uint8_t op_code) +{ + static __lowmem struct disk_ebios_dapa dapa; + void *buf; + + buf = lmalloc(count * diskinfo->bps);...
2013 Sep 06
2
[PATCH 1/2] com32/lib/: Avoid unneeded allocation.
...s_t inreg, outreg; - struct disk_ebios_eparam *eparam; + struct disk_ebios_eparam *eparam = NULL; int rv = 0; memset(diskinfo, 0, sizeof *diskinfo); @@ -94,12 +94,12 @@ int disk_get_params(int disk, struct disk_info *const diskinfo) diskinfo->ebios = 1; } - eparam = lmalloc(sizeof *eparam); - if (!eparam) - return -1; - /* Get extended disk parameters if ebios == 1 */ if (diskinfo->ebios) { + eparam = lmalloc(sizeof *eparam); + if (!eparam) + return -1; + memset(&inreg, 0, sizeof inreg); inreg.eax.b[1] = 0x48; inreg.edx.b[0] = disk; @@ -...
2013 Sep 30
0
[PATCH 1/4 v2] com32/lib/: Avoid unneeded allocation.
...param *eparam; > + struct disk_ebios_eparam *eparam = NULL; > int rv = 0; > > memset(diskinfo, 0, sizeof *diskinfo); > @@ -94,12 +94,12 @@ int disk_get_params(int disk, struct disk_info *const diskinfo) > diskinfo->ebios = 1; > } > > - eparam = lmalloc(sizeof *eparam); > - if (!eparam) > - return -1; > - > /* Get extended disk parameters if ebios == 1 */ > if (diskinfo->ebios) { > + eparam = lmalloc(sizeof *eparam); > + if (!eparam) > + return -1; > + > memset(&inreg, 0, sizeof inreg); >...
2012 Apr 17
2
[GIT PULL] elflink warning fixes and auto extension support
...Remove core/ui.inc completely from Syslinux (2012-04-11 21:25:33 -0300) are available in the git repository at: git://git.zytor.com/users/mfleming/syslinux.git elflink Matt Fleming (43): ldlinux: Automatically lookup file extension core: Partial revert of commit 9333426b and unify lmalloc() getcwd.c: Include core_getcwd() prototype sys/open.c: Fix building warnings from missing prototype sys/fileread.c: Fix build warning from missing prototype sys/fileclose.c: Fix build warning from missing prototype syslinux/idle.c: Fix build warnings from missing prot...
2015 Aug 07
1
[PATCH] com32: write_sectors fixes
...--git a/com32/gpllib/disk/write.c b/com32/gpllib/disk/write.c index d183ade..3c9edff 100644 --- a/com32/gpllib/disk/write.c +++ b/com32/gpllib/disk/write.c @@ -40,7 +40,7 @@ int write_sectors(const struct driveinfo *drive_info, const unsigned int lba, void *buf; int rv = -1; - buf = lmalloc(size); + buf = lmalloc(SECTOR * size); if (!buf) return -1; @@ -48,7 +48,7 @@ int write_sectors(const struct driveinfo *drive_info, const unsigned int lba, if (!dapa) goto out; - memcpy(buf, data, size); + memcpy(buf, data, SECTOR * size); memset(&inreg, 0, sizeo...
2013 Sep 17
0
[PATCH 1/2] com32/lib/: Avoid unneeded allocation.
...ram *eparam; > + struct disk_ebios_eparam *eparam = NULL; > int rv = 0; > > memset(diskinfo, 0, sizeof *diskinfo); > @@ -94,12 +94,12 @@ int disk_get_params(int disk, struct disk_info *const diskinfo) > diskinfo->ebios = 1; > } > > - eparam = lmalloc(sizeof *eparam); > - if (!eparam) > - return -1; > - > /* Get extended disk parameters if ebios == 1 */ > if (diskinfo->ebios) { > + eparam = lmalloc(sizeof *eparam); > + if (!eparam) > + return -1; > + There's trailing whitespace here. > m...
2011 Aug 03
0
[LLVMdev] Building LLVM on Solaris/Sparc
...pers.o /n/fs/scratch/tpondich/ParallelAssert/llvm-objects/tools/opt/Debug+Asserts/GraphPrinters.o /n/fs/scratch/tpondich/ParallelAssert/llvm-objects/tools/opt/Debug+Asserts/PrintSCC.o /n/fs/scratch/tpondich/ParallelAssert/llvm-objects/tools/opt/Debug+Asserts/opt.o \ > -lLLVM-2.9svn -lpthread -lmalloc -lm It seems like you're missing a whole bunch of libraries on the command line. This is what I have when I compile it: -lLLVMipo -lLLVMScalarOpts -lLLVMInstCombine -lLLVMInstrumentation -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMAsmParser -lLLVMBitWriter -lLLV...
2015 Sep 24
0
[PATCH] com32/disk: add UEFI support
...55aa; - inreg.edx.b[0] = disk; - inreg.eflags.b[0] = 0x3; /* CF set */ - - __intcall(0x13, &inreg, &outreg); - - if (!(outreg.eflags.l & EFLAGS_CF) && - outreg.ebx.w[0] == 0xaa55 && (outreg.ecx.b[0] & 1)) { - diskinfo->ebios = 1; - } - - eparam = lmalloc(sizeof *eparam); - if (!eparam) - return -1; - - /* Get extended disk parameters if ebios == 1 */ - if (diskinfo->ebios) { - memset(&inreg, 0, sizeof inreg); - inreg.eax.b[1] = 0x48; - inreg.edx.b[0] = disk; - inreg.esi.w[0] = OFFS(eparam); - inreg.ds = SEG(eparam); - - memset(epara...
2008 Jul 01
17
Memory leak scripts
Hola, I am trying to isolate the memory leak I suspect in a mailman installation ? I found: http://blogs.sun.com/sanjeevb/date/200506 It gives an error: god at irt-smtp-02:~ 9:21am 65 # ./memleak.d 10312 dtrace: failed to compile script ./memleak.d: line 3: probe description pid10312:libc.so.1:malloc:entry does not match any probes I am on SunOS 5.10 Generic_127112-07 i86pc i386 i86pc Are
2010 Jul 27
0
__free_tagged not freeing memory?
__free_tagged called by comboot_cleanup_lowmem (core/mem/free.c) doesn't seem to work correctly. Memory allocated with lmalloc() isn't marked as free after the allocating module exits: boot: mem lowmem_buf: 0x000353e0 boot: mem lowmem_buf: 0x000553f0 boot: mem lowmem_buf: 0x00075400 boot: mem lowmem_buf: 0x00000000 boot: The expected behaviour boot: mem lowmem_buf: 0x000353e0 boot: mem lowmem_buf: 0x000353e0 boot: m...
2011 Aug 05
0
[LLVMdev] Building LLVM on Solaris/Sparc
...h/ParallelAssert/llvm-objects/tools/opt/Debug+Asserts/Gr! > aphPrinters.o > /n/fs/scratch/tpondich/ParallelAssert/llvm-objects/tools/opt/Debug+Asserts/PrintSCC.o > /n/fs/scratch/tpondich/ParallelAssert/llvm-objects/tools/opt/Debug+Asserts/opt.o > \ > > -lLLVM-2.9svn -lpthread -lmalloc -lm > > It seems like you're missing a whole bunch of libraries on the command > line. This is what I have when I compile it: > > -lLLVMipo -lLLVMScalarOpts -lLLVMInstCombine -lLLVMInstrumentation > -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC > -lLLV...