Displaying 3 results from an estimated 3 matches for "garbarg".
Did you mean:
gerbarg
2004 Dec 09
2
a question about swap space, memory and read.table()
...s more, I found that the read.table() function is really a waste of memory.
> ft <- read.table("filepath")
> object.size(ft)
object.size(ft)
[1] 192000692
only 192Mb.
however, in the windows task manager it shows that this process takes
nearly 800Mb memory.
I used gc() to collect garbarge. Howerver it doesn't help.
Any guys have methods to release the wasted memory?
thank you all.
Regards
2018 Jul 16
2
Memory leakage from large lists
...ing used
MemoryUsed <- function(){
pid <- Sys.getpid()
system(paste0("top -n 1 -p ", pid, " -b"), intern = TRUE)[c(7,8)]
}
# Initial memory (VIRT memory equals about 400,000 bytes on my machine)
MemoryUsed()
# Create a large list of large data, remove it, and perform garbarge
collection
ncols <- 100
nrows <- 10000
mat <- matrix(seq(nrows * ncols), nrow = nrows, ncol = ncols)
ls <- lapply(1:1000, function(x) as.data.frame(mat))
rm(list = setdiff(ls(), 'MemoryUsed'))
invisible(gc())
# Final memory (now, VIRT memory equals about 4,600,000 bytes on my...
2018 Jul 17
0
Memory leakage from large lists
...> pid <- Sys.getpid()
> system(paste0("top -n 1 -p ", pid, " -b"), intern = TRUE)[c(7,8)]
> }
>
> # Initial memory (VIRT memory equals about 400,000 bytes on my machine)
> MemoryUsed()
>
> # Create a large list of large data, remove it, and perform garbarge
> collection
> ncols <- 100
> nrows <- 10000
> mat <- matrix(seq(nrows * ncols), nrow = nrows, ncol = ncols)
> ls <- lapply(1:1000, function(x) as.data.frame(mat))
> rm(list = setdiff(ls(), 'MemoryUsed'))
> invisible(gc())
>
> # Final memory (now, VIR...