Category "memory"

How do I get the size of a ruby object in mb in Rails?

I want to query an ActiveRecord model, modify it, and calculate the size of the new object in mb. How do I do this?

MemoryError: Unable to allocate 1.88 GiB for an array with shape (2549150, 99) and data type object

I have a problem. I want to normalize with pd.json_normalize(...) a list with inside dict but unfortunately I got a MemoryError. Is there an option to work arou

Fortify's denial of service problem in stringbuilder in java

Fortify client gives the error and recommendations for string builder, problem code: StringBuilder sb=new StringBuilder(); sb.append(request.getParameter("i

PE Section Flags

For example Characteristics of section .text is 60000020, seems that is IMAGE_SCN_CNT_CODE 0x00000020 IMAGE_SCN_MEM_EXECUTE 0x20000000 IMAGE_SCN_MEM_READ 0

How do I read a large csv file with pandas?

I am trying to read a large csv file (aprox. 6 GB) in pandas and i am getting a memory error: MemoryError Traceback (most recent

Python 'Out of memory' when opening image

import pygame from pygame.locals import * \ image = pygame.image.load('.\\w.jpg') I'm trying to load an 59MB jpg file and it fails saying 'Out of memory' I'm

Binary Exploitation - ASLR

This is more so just a general question about how ASLR actually prevents Buffer Overflow. The statement I keep seeing is that it randomises the address space of

Concatenating PDF files in memory with PyPDF2

I wish to concatenate (append) a bunch of small pdfs together effectively in memory in pure python. Specifically, an usual case is 500 single page pdfs, each wi

In a CUDA kernel, how do I store an array in "local thread memory"?

I'm trying to develop a small program with CUDA, but since it was SLOW I made some tests and googled a bit. I found out that while single variables are by defau

How to analyze golang memory?

I wrote a golang program, that uses 1.2GB of memory at runtime. Calling go tool pprof http://10.10.58.118:8601/debug/pprof/heap results in a dump with only 323

Javascript classes vs objects, pros and cons?

In my most recent javascript program (which is mostly for fun and proof-of-concept than anything else) I have a lot of different kinds of objects and of each ki

Alignment Rules

I'm having a bit of trouble with a homework problem, and I was wondering if anyone could point me in the right direction. Suppose we are compiling for a mac