logo
down
shadow

How can I access full memory space in FreeDOS with C application


How can I access full memory space in FreeDOS with C application

By : Gerry Deckert
Date : October 20 2020, 06:10 AM
around this issue Specifically with respect to malloc(), as I recall the Borland implementation takes a 16 bit size argument. The Borland library has "huge" memory model a version halloc() (and a correspinding hfree()) which can allocate larger blocks (larger than 64kb).
JEMM386 it is an extended memory manager, which pages memory above 1Mb into the "high-memory" region above 640K - this region is only 384Kb in size, not all of which is available for memory paging, and that is probably the cause of the 300Kb limit you have observed by experiement.
code :


Share : facebook icon twitter icon
Does using FreeDOS allow my program to access more than 64 K of memory?

Does using FreeDOS allow my program to access more than 64 K of memory?


By : Vũ Minh Tiến
Date : March 29 2020, 07:55 AM
this will help Without any extender a program can use maximum 640KB of low mem on DOS. But each structure will be limit to the size of a segment, or 64KB. That means you can have 10 large arrays of size 64KB. Of course you can use more by having multiple arrays in a segment but their total size must not exceed the segment size
Is the maximum memory space an application can use equals to (physical memory + swap space)?

Is the maximum memory space an application can use equals to (physical memory + swap space)?


By : user2077812
Date : March 29 2020, 07:55 AM
Hope this helps This is a complicated question.
First of all, the theoretical virtual memory space of 64-bit system is 2^64. But in fact, neither the OS nor the CPU supports so big virtual memory space or physical RAM.
Assembly: dynamic memory allocation without malloc and syscalls? [FreeDOS application]

Assembly: dynamic memory allocation without malloc and syscalls? [FreeDOS application]


By : alexzhanghc
Date : March 29 2020, 07:55 AM
should help you out When DOS loads a .COM program, it allocates all of the memory available in the 640KB area (below 0a000h:00000h) to the program, and the program can manage its own memory. If it is desired to use MSDOS memory management, the program first has to release the memory using INT 21H, AH=49H, ES=segment, BX=# paragraphs. It can then use INT 21H, AH=48H, BX=# paragraphs, to allocate memory.
As noted in the comments, an .EXE program may or may not allocate all of the memory in the 640KB area.
code :
        .286
        .model  tiny,c
        .code
        org     0100h
;       cs,ds,es,ss = program segment prefix, sp = 0fffeh
start:  mov     bx,offset cdend         ;set bx=end stack
        add     bx,0010fh
        and     bx,0fff0h
        mov     sp,bx                   ;sp = new end of stack
        mov     cl,4                    ;release memory
        shr     bx,cl
        mov     ax,04a00h
        int     21h
        mov     ax,04800h               ;set bx = available memory
        mov     bx,0ffffh
        int     21h
        mov     ax,04800h               ;allocate all of it
        int     21h                     ; returns segment in ax
exit:   mov     ax,04c00h               ;exit
        int     21h
cdend:
        end     start
How user space memory and kernel space memory is mapped to physical memory in Linux?

How user space memory and kernel space memory is mapped to physical memory in Linux?


By : New2This
Date : March 29 2020, 07:55 AM
wish helps you
So What I understand is, for 32 bit architecture, we have 4 GB virtual memory, In which 3 GB is used for user space and 1 GB for kernel space.
linux mmap access to PCI memory region from user space application

linux mmap access to PCI memory region from user space application


By : K. Ng
Date : March 29 2020, 07:55 AM
it should still fix some issue You can take a look at pci_debug program code, available here. If you have bus error, it's maybe a FPGA design problem. Is your IP AXI bus accept 32bits/16bits/8bits access ? Be sure to access memory with right address (if 32bits address must divisible by 4, if 16 bits by 2).
Related Posts Related Posts :
  • Problem with C function of type char pointer, can someone explain?
  • Macros in C.... please give the solution
  • Unix Piping using Fork and Dup
  • Any difference between these two while loops?
  • Hashtable implementation for C
  • Problems with Linked List in C
  • Stack Allocation in C
  • Random function stuck on one number
  • printf following zeros to a certain degree
  • Measuring CPU clocks consumed by a process
  • How is a CRC32 checksum calculated?
  • Tips on redefining a register bitfield in C
  • Converting a program from c to bash script
  • Static library not included in resulting LLVM executable
  • What is the meaning of "wild pointer" in C?
  • Reading DWORD from binary file
  • Efficient way to find divisibility
  • Whats the fastest, portable way to hash pointers we know are pointer aligned to a fixed size int?
  • Why does my summation program behaves weird?
  • How to determine values saved on the stack?
  • Thread scheduling C
  • C - converting to 2s complement
  • wireless networks c program
  • From where does the uboot get the information about flash, RTC, RAM in uboot/kernel development
  • printf behaviour in C
  • Measure size and way-order of L1 and L2 caches
  • Efficient copy of entire directory
  • Efficient way to create/unpack large bitfields in C?
  • getnameinfo prototype asks for sockaddr not sockaddr_in?
  • Linked List Sorting with Strings In C
  • Typecasting a floating value or using the math.h floor* functions?
  • Problem implementing sorting algorithm in C with an array of structs
  • How to copy a ram_base file to disk efficiently
  • How to fix casting a pointer to an integer?
  • How to round floating point numbers to the nearest integer in C?
  • PIC C - Sending 200 values over USB, but it only sends 25 or so of them
  • How do you return a string from a function correctly in Dynamic C?
  • Monotonic clock on IRIX
  • setsockopt (sys/socket.h)
  • How to make C program wait (on Linux)?
  • i find a problem using atoi() method in ansi c?
  • Why is this array being initialized in an odd way?
  • How to execute commands in chroot?
  • Microsecond (or one ms) time resolution on an embedded device (Linux Kernel)
  • Question about variable definitions in functions
  • SMTP on C: STARTTLS via OpenSSL
  • fetch value of ipaddress
  • Binary expressions in C
  • Why do char * and char ** have the same value?
  • problem in allocating kernel memory by malloc() from user space?
  • dangling pointer, reason for value change after free()?
  • How to compile C program with multiple files in Xcode
  • Can you make an incrementing compiler constant?
  • Reading data from text file in C
  • SQLite's test code to production code ratio
  • Displaying an inverted pyramid of asterisks
  • sd spi mode in C language
  • printf("%2d") in C programming
  • Add a certain number of bytes to a void pointer in C
  • How should I protect against hard link attacks?
  • shadow
    Privacy Policy - Terms - Contact Us © 35dp-dentalpractice.co.uk