Results 1 to 2 of 2

Thread: Memory

  1. #1

    Thread Starter
    Hyperactive Member Warmaster199's Avatar
    Join Date
    Aug 2000
    Location
    Canada
    Posts
    306

    Question

    I'm an Intermediate programmer, I know some things, but not everything.

    (1) So now, fellow programmers, can anyone tell me how to get information on the system memory. This includes:

    Conventional(base, 0-640KB) memory: total, free(avail)
    HMS(high memory): total, free(avail)
    XMS(Extended,1MB and +): total, free(avail)

    This would be a great help.

    (2) Hard Disk space. Total and available. I know how to get the total amount of clusters and the free amount of clusters. I know that using these cluster numbers, you can find out how many byte, kbytes, mbytes your HDD has.
    Designer/Programmer of the Comtech Operating System(CTOS)

  2. #2

    Thread Starter
    Hyperactive Member Warmaster199's Avatar
    Join Date
    Aug 2000
    Location
    Canada
    Posts
    306
    I found out how to get the HDD space and the available:
    Code:
    main()
    {
        long var;
        struct dfree *df;
        getdfree(3,df);   /* drive #3 (C:\) */
        var = df->dw_avail * df->dw_sclus * df->dw_bsec;
        printf("You have %ld KBytes left on your Hard Disk", var);
    }
    If these functions look wierd(ie. getdfree(), It's because I used PowerC by Mix.

    Now, can someone know how to find this info out on system memory?????

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width