memory

Sensitive Data In Memory

。_饼干妹妹 提交于 2020-01-21 03:59:46
问题 I'm working on a Java password manager and I currently have all of the user's data, after being decrypted from a file, sitting around in memory at all times and stored plainly as a String for displaying in the UI etc. Is this a security risk in any way? I'm particularly concerned with someone "dumping" or reading the computer's memory in some way and finding a user's naked data. I've considered keeping all sensitive pieces of data (the passwords) encrypted and only decrypting each piece as

XJTLU CSE101 revision note

不想你离开。 提交于 2020-01-21 00:52:00
/* This is my revision note of the CSE101 module. Hopefully you can find it somehow helpful. ------by Livingstone, 2020. */ Overview of this course How the computer works at the machine code level Understand some of the computer hardware basic principle of data storage, and coding of information the roles and organization of major kinds of system software content: Overview of computer systems: hardware and software Machine architecture and instruction execution(stored program, program execution) Machine-level correspondence to higher level constructs(loop, conditional, subroutines, recursions)

【5min+】传说中的孪生兄弟? Memory and Span

北战南征 提交于 2020-01-20 18:37:18
系列介绍 【五分钟的dotnet】是一个利用您的碎片化时间来学习和丰富.net知识的博文系列。它所包含了.net体系中可能会涉及到的方方面面,比如C#的小细节,AspnetCore,微服务中的.net知识等等。 5min+不是超过5分钟的意思,"+"是知识的增加。so,它是让您花费5分钟以下的时间来提升您的知识储备量。 正文 在上一篇文章: 《闪电光速拳? .NetCore 中的Span》 中我们提到了在.net core 2.x 所新增的一个类型: Span 。 它与咱们传统使用的基础类型相比具有超高的性能,原因是它减少了大量的内存分配和数据量复制,并且它所分配的数据内存是连续的。 但是您会发现它无法用在我们项目的某些地方,它独特的 ref结构 使它没有办法跨线程使用、更没有办法使用Lambda表达式。 特别是在AspNetCore中,咱们会使用到大量的异步操作方法。“所以,这个时候如果我们又想跨线程操作数据又想获得类似 Span 这样的性能怎么办呢?” 上一篇文章我们留下了这样的一个问题,所以现在就是到了还愿的时候了。它就是与 Span 一起发布的孪生兄弟: Memory 。 狮子座和射手座黄金圣斗士同样具备超越光速的能力 什么是Memory 那什么是 Memory 呢?不妨我们先来猜测一下,它的结构是什么样子。毕竟它是 Span 的孪生兄弟,而 Span

Android: Detecting leaks with Eclipse Memory Analyzer

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-20 07:20:26
问题 I have this problem Android: Screen orientation error + VM won't let us allocate x bytes so I decided to download Eclipse Memory Analyzer. I run it when my error is appearing and I have 3 problems suspects but I don't understand where it might come from. + I don't really know if my problem is due to a memory leak as the possible leaks take only 2.2;B space PROBLEM SUSPECT 1 2,094 instances of "java.lang.Class", loaded by "<system class loader>" occupy 789,200 (33.76%) bytes. Biggest instances

scala mailbox size limit

不问归期 提交于 2020-01-20 03:52:05
问题 Can I set maximum size for an actor's mailbox in Scala? Take the Producer-Consumer problem. With threads I can block the producers when the buffer fills up. I saw a couple of producer-consumer examples written in Scala and they all use actors with mailboxes used as a "buffer". Can I set mailbox size to cause producers to wait until a consumer is ready? Any other elegant solution to avoid uncontrollable growth of mailboxes? 回答1: You can create an actor that acts as a buffer between the

Custom KeyBoard get terminated due to memory pressure in iOS 8

穿精又带淫゛_ 提交于 2020-01-20 03:27:46
问题 Custom KeyBoard get terminated due to memory pressure in iOS 8 Initially my custom keyboard is taking around 25mb of memory, but this memory is not deallocated with I dissmiss the keyboard. Memory keep on increase when we open custom keyboard again and again and finally terminated due to memory pressure. Help me out with this issue? 回答1: You can dealloc some things in ViewWillDisappear function of KeyboardViewController 回答2: The keyboard extension runs in a process that persists after the

Alignment

与世无争的帅哥 提交于 2020-01-20 03:26:43
One of the low-level features of C++ is the ability to specify the precise alignment of objects in memory to take maximum advantage of a specific hardware architecture. By default, the compiler aligns class and struct members on their size value: bool and char on 1-byte boundaries, short on 2-byte boundaries, int , long , and float on 4-byte boundaries, and long long , double , and long double on 8-byte boundaries. In most scenarios, you never have to be concerned with alignment because the default alignment is already optimal. In some cases, however, you can achieve significant performance

CUDA ---- Memory Access

天涯浪子 提交于 2020-01-19 18:57:44
Memory Access Patterns 大部分device一开始从global Memory获取数据,而且,大部分GPU应用表现会被带宽限制。因此最大化应用对global Memory带宽的使用时获取高性能的第一步。也就是说,global Memory的使用就没调节好,其它的优化方案也获取不到什么大效果,下面的内容会涉及到不少L1的知识,这部分了解下就好,L1在Maxwell之后就不用了,但是cache的知识点是不变的。 Aligned and Coalesced Access 如下图所示,global Memory的load/store要经由cache,所有的数据会初始化在DRAM,也就是物理的device Memory上,而kernel能够获取的global Memory实际上是一块逻辑内存空间。Kernel对Memory的请求都是由DRAM和SM的片上内存以128-byte和32-byte传输解决的。 所有获取global Memory都要经过L2 cache,也有许多还要经过L1 cache,主要由GPU的架构和获取模式决定的。如果L1和L2都被使用,那么Memory的获取是以128-byte为单位传输的,如果只使用L2,则以32-byte为单位传输,在允许使用L1的GPU中(Maxwell已经彻底不使用L1,原本走L1都换成走texture cache)

kubernetes之配置Pod的QoS

余生长醉 提交于 2020-01-19 17:16:40
简介 此文讲述如何配置Pod的QoS(Quality of Service)即服务质量。Kubernetes使用QoS类来做出有关调度和驱逐Pod的决策。 备注:此文档参考官方文档,并加以自己的理解。如有误导性的内容,请批评指正。 QoS类 当Kubernetes创建Pod时,它将为这些Pod分配以下QoS类之一: Guaranteed Burstable BestEffort 创建一个分配了QoS类Guaranteed的Pod 创建namespace # kubectl create namespace qos-example 为Pod提供QoS类为Guaranteed的条件: Pod中的每个容器必须有内存请求和内存限制,而且它们的值必须相同 Pod中的每个容器必须有CPU请求和CPU限制,而且它们的值必须相同 创建一个Pod,该Pod中只有一个容器。该容器中自定义了内存请求和内寸限制,均等于 200MiB ,CPU请求和CPU限制均等于 700 milli CPU。文件名: qos-pod.yaml apiVersion: v1 kind: Pod metadata: name: qos-demo namespace: qos-example spec: containers: - name: qos-demo-ctr image: nginx resources:

Why does my garbage collection log show 3.8GB as the max available heap size while I have allocated 4GB as the max heap size?

穿精又带淫゛_ 提交于 2020-01-19 17:11:56
问题 I have a 64-bit hotspot JDK version 1.7.0 installed on a 64-bit RHEL 6 machine. I use the following JVM options for my tomcat application. CATALINA_OPTS="${CATALINA_OPTS} -Dfile.encoding=UTF8 -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false -Duser.timezone=EST5EDT" # General Heap sizing CATALINA_OPTS="${CATALINA_OPTS} -Xms4096m -Xmx4096m -XX:NewSize=2048m -XX:MaxNewSize=2048m -XX:PermSize=512m -XX:MaxPermSize=512m -XX:+UseCompressedOops -XX:+DisableExplicitGC" #