memory-footprint

Do Java 14 records actually save memory over a similar class declaration or are they more like syntactic sugar?

人盡茶涼 提交于 2020-05-12 15:57:29
问题 I’m hoping that Java 14 records actually use less memory than a similar data class. Do they or is the memory usage the same? 回答1: To add to the basic analysis performed by @lugiorgi and a similar noticeable difference that I could come up with analyzing the byte code, is in the implementation of toString , equals and hashcode . On one hand, previously used class with overridden Object class APIs looking like public class City { private final Integer id; private final String name; // all-args,

Do Java 14 records actually save memory over a similar class declaration or are they more like syntactic sugar?

空扰寡人 提交于 2020-05-12 15:54:33
问题 I’m hoping that Java 14 records actually use less memory than a similar data class. Do they or is the memory usage the same? 回答1: To add to the basic analysis performed by @lugiorgi and a similar noticeable difference that I could come up with analyzing the byte code, is in the implementation of toString , equals and hashcode . On one hand, previously used class with overridden Object class APIs looking like public class City { private final Integer id; private final String name; // all-args,

Cobalt for Amazon Prime

青春壹個敷衍的年華 提交于 2020-01-07 01:18:33
问题 We are planning to use a Cobalt port on our embedded platform to run applications like Amazon Prime along with YouTube. Is it possible to use it for applications other than YouTube? If so, what is the expected run-time footprint of Cobalt? Also, is there any licensing cost associated with Cobalt? 回答1: Cobalt can run any application that has been engineered to run within the Cobalt subset of HTML/CSS/WebAPI. It is unlikely that Amazon Prime Video will run out of the box on Cobalt, but it could

Java performance: true vs. Boolean.TRUE

徘徊边缘 提交于 2019-12-29 03:20:29
问题 Which of the following is better in terms of performance and efficient memory usage? Boolean isItTrue(arg){ return Boolean.TRUE; } boolean isItTrue(arg){ return Boolean.TRUE } Boolean isItTrue(arg){ return true; } boolean isItTrue(arg){ return true; } It should be faster and easier to work with primitive types, but on the other hand, when using a reference to a static object, no new value is created. Or is it optimized on compiler level and all true and false are replaced by references to the

Tools to analyzing the memory footprint of native DLLs and assemblies loaded in a process?

依然范特西╮ 提交于 2019-12-20 18:25:10
问题 I have a process holding 130MB of memory according to task manager, with only 11MB of live .NET objects according to dotTrace so I am wondering what's happening with the other 120MB?? I'd need a tool to list assemblies and native DLLs loaded in a process, gets the size of the images in process, and, for each assembly, measure the memory footprint of the methods JITed. ListDlls from SysInternal does partly that job. But it doesn't measure JITed code size and it just provides raw data. Ideally

How can I reduce the memory footprint of a minimal Linux process

一笑奈何 提交于 2019-12-08 18:32:15
问题 Consider the following C program, 'pause.c': void main() { pause(); } Compiling this on x64 Linux 3.0.0-16-generic using this command 'gcc -Os pause.c -o pause' produces an executable of size ~8KB. When I run this executable and examine its precise memory footprint using 'pmap -d PID', it shows me that the private memory allocated to the process is 192KB (it varies across different systems usually, between 128KB and 192KB). Examining the process using valgrind and massif fails to detect any

Tools to analyzing the memory footprint of native DLLs and assemblies loaded in a process?

▼魔方 西西 提交于 2019-12-03 05:47:00
I have a process holding 130MB of memory according to task manager, with only 11MB of live .NET objects according to dotTrace so I am wondering what's happening with the other 120MB?? I'd need a tool to list assemblies and native DLLs loaded in a process, gets the size of the images in process, and, for each assembly, measure the memory footprint of the methods JITed. ListDlls from SysInternal does partly that job. But it doesn't measure JITed code size and it just provides raw data. Ideally I'd like a UI to analyze and sum-up these data. Recently, the Visual Studio team reported having done

Finding memory leaks in C# application

隐身守侯 提交于 2019-12-01 08:50:17
I have an application in C#, Framework 4. Very basically, this application mainly react to events and creates objects, release them, create database connection and close them. Now, we've been seeing that the application's process grows sometimes in very strange ways. We've got two different behaviors : The application grows until reaching up to 4 GB in RAM when usually it "should" stay at around 500 MB. Consequence -> it crashes! The application grows slowly up to 1200 MB (30 minutes) and then abruptly shrinks to 500 MB (in one second)... and this process repeats itself every now and then. Can

Finding memory leaks in C# application

喜你入骨 提交于 2019-12-01 06:33:43
问题 I have an application in C#, Framework 4. Very basically, this application mainly react to events and creates objects, release them, create database connection and close them. Now, we've been seeing that the application's process grows sometimes in very strange ways. We've got two different behaviors : The application grows until reaching up to 4 GB in RAM when usually it "should" stay at around 500 MB. Consequence -> it crashes! The application grows slowly up to 1200 MB (30 minutes) and

How is memory-efficient non-destructive manipulation of collections achieved in functional programming?

浪子不回头ぞ 提交于 2019-11-29 21:43:50
I'm trying to figure out how non-destructive manipulation of large collections is implemented in functional programming, ie. how it is possible to alter or remove single elements without having to create a completely new collection where all elements, even the unmodified ones, will be duplicated in memory. (Even if the original collection would be garbage-collected, I'd expect the memory footprint and general performance of such a collection to be awful.) This is how far I've got until now: Using F#, I came up with a function insert that splits a list into two pieces and introduces a new