diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2026-01-16 15:26:43 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2026-01-16 15:26:43 +0900 |
| commit | 1cc7602b43337d1f5d24415ef471bb39e6567b34 (patch) | |
| tree | 29c01651adff35b0762ab0b7171b84e0f48fa1c7 /kcontrol/info/memory_hpux.cpp | |
| parent | 623738e42c5878f7eccf86d5731efd038a5a775e (diff) | |
| download | tdebase-drop/hpux-support.tar.gz tdebase-drop/hpux-support.zip | |
Remove support for HPUX, which is discontinued and does not provide a c++17 complaint compiler.drop/hpux-support
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kcontrol/info/memory_hpux.cpp')
| -rw-r--r-- | kcontrol/info/memory_hpux.cpp | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/kcontrol/info/memory_hpux.cpp b/kcontrol/info/memory_hpux.cpp deleted file mode 100644 index 4fefdfb35..000000000 --- a/kcontrol/info/memory_hpux.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* - - This file will be included by memory.cpp ! - - HP-UX is really ugly to retrieve information from ! - Implemented on 24.04.1999 by Helge Deller (deller@gmx.de) - Tested on an HP9000/715/64 under HPUX-10.20. - Updated for QT 2.0 on 27.04.1999 (deller) - - Sorry, but I don't know, who implemented the first (little) version of - update(), but it showed wrong sizes ! - - Many thanks goes also to Mike Romberg, who implemented such functions in - the program "xosview". Here's his copyright: - Copyright (c) 1994, 1995 by Mike Romberg ( romberg@fsl.noaa.gov ) - -*/ - -#include <stdio.h> -#include <unistd.h> -#include <sys/param.h> -#include <sys/pstat.h> - - -#define MAX_SWAP_AREAS 16 - -void KMemoryWidget::update() -{ - int page_size,i; - unsigned long total_mem, total_free, - total_physical, total_swap, free_physical, - used_physical, used_swap, free_swap; - - struct pst_static pststatic; - struct pst_dynamic stats; - struct pst_vminfo vmstats; - unsigned long fields_[4]; - struct pst_swapinfo swapinfo; - - pstat_getstatic( &pststatic, sizeof( struct pst_static ), (size_t)1, 0); - total_physical = pststatic.physical_memory; - page_size = (int)pststatic.page_size; - - pstat_getdynamic(&stats, sizeof( pst_dynamic ), (size_t)1, 0); - pstat_getvminfo(&vmstats, sizeof(vmstats), (size_t)1, 0); - - fields_[0] = stats.psd_rmtxt + stats.psd_arm; // TEXT - fields_[1] = stats.psd_rm - stats.psd_rmtxt; // USED - fields_[2] = total_physical - fields_[0] - fields_[1] - stats.psd_free; //OTHER - fields_[3] = stats.psd_free; // FREE - - used_physical = (total_physical - fields_[3]) * page_size; - total_physical *= page_size; - free_physical = (total_physical - used_physical); - - - /* Now check the SWAP-AREAS !! */ - - total_swap = free_swap = 0; - - for (i = 0 ; i < MAX_SWAP_AREAS ; i++) - { - pstat_getswap(&swapinfo, sizeof(swapinfo), (size_t)1, i); - if (swapinfo.pss_idx == (unsigned)i) - { - swapinfo.pss_nfpgs *= 4; // nfpgs is in 512 Byte Blocks.... - if (swapinfo.pss_nblksenabled == 0) // == 0 ?? - swapinfo.pss_nblksenabled = swapinfo.pss_nfpgs; - total_swap += (((unsigned long)swapinfo.pss_nblksenabled) * 1024); - free_swap += (((unsigned long)swapinfo.pss_nfpgs ) * 1024); - } - } - - used_swap = total_swap - free_swap; - - - /* Now display the results */ - - total_mem = total_physical; // + total_swap; - total_free = (total_physical - used_physical);// + free_swap; - - Memory_Info[TOTAL_MEM] = MEMORY(total_mem); // total physical memory (without swaps) - Memory_Info[FREE_MEM] = MEMORY(total_free);// total free physical memory (without swaps) - Memory_Info[SHARED_MEM] = NO_MEMORY_INFO; /* FIXME ?? */ - Memory_Info[BUFFER_MEM] = MEMORY(fields_[2])*page_size; /* FIXME ?? */ - Memory_Info[SWAP_MEM] = MEMORY(total_swap); // total size of all swap-partitions - Memory_Info[FREESWAP_MEM] = MEMORY(free_swap); // free memory in swap-partitions -#ifdef __GNUC__ -#warning "FIXME: Memory_Info[CACHED_MEM]" -#endif - Memory_Info[CACHED_MEM] = NO_MEMORY_INFO; // cached memory in ram -} |
