Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.

Commit

Permalink
fix totalmem and freemem count
Browse files Browse the repository at this point in the history
  • Loading branch information
ccw-1 authored and andrew-cc-chen committed Mar 4, 2019
1 parent 450fdd1 commit 31b0ba5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions deps/cares/config/os390/ares_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#define GETNAMEINFO_TYPE_ARG7 int

/* Specifies the number of arguments to getservbyport_r */
#define GETSERVBYPORT_R_ARGS 4
// #define GETSERVBYPORT_R_ARGS 4

/* Specifies the size of the buffer to pass to getservbyport_r */
#define GETSERVBYPORT_R_BUFSIZE sizeof(struct servent_data)
Expand Down Expand Up @@ -116,7 +116,7 @@
#define HAVE_GETNAMEINFO 1

/* Define to 1 if you have the getservbyport_r function. */
#define HAVE_GETSERVBYPORT_R 1
// #define HAVE_GETSERVBYPORT_R 1

/* Define to 1 if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1
Expand Down
4 changes: 2 additions & 2 deletions deps/uv/src/unix/os390.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ uint64_t uv_get_free_memory(void) {
data_area_ptr rcep = {0};
cvt.assign = *(data_area_ptr_assign_type*)(CVT_PTR);
rcep.assign = *(data_area_ptr_assign_type*)(cvt.deref + CVTRCEP_OFFSET);
freeram = *((uint64_t*)(rcep.deref + RCEAFC_OFFSET)) * 4;
freeram = *((uint32_t*)(rcep.deref + RCEAFC_OFFSET)) * 4;
return freeram;
}

Expand All @@ -354,7 +354,7 @@ uint64_t uv_get_total_memory(void) {
data_area_ptr rcep = {0};
cvt.assign = *(data_area_ptr_assign_type*)(CVT_PTR);
rcep.assign = *(data_area_ptr_assign_type*)(cvt.deref + CVTRCEP_OFFSET);
totalram = *((uint64_t*)(rcep.deref + RCEPOOL_OFFSET)) * 4;
totalram = *((uint32_t*)(rcep.deref + RCEPOOL_OFFSET)) * 4;
return totalram;
}

Expand Down

0 comments on commit 31b0ba5

Please sign in to comment.