openssl加密文件
引言
为了让服务器上的别人不看我的代码,就决定对文件进行打包,然后对压缩包进行加密。
在大多数操作系统中,操作系统内核负责管理物理内存和虚拟内存。应用程序通常与虚拟内存进行交互,而不是直接与物理内存交互。这意味着,当你在程序中申请内存时(例如,使用C/C++中的malloc
或new
),你实际上是在申请虚拟内存空间。操作系统负责将这些虚拟内存映射到物理内存上,而且这种映射是动态的,可以发生改变。如果需要,操作系统会将不活跃的内存页交换(swap)到磁盘上。
尽管直接控制物理内存不是通常程序所做的,但在某些特定场景下,如需要确保数据处理的实时性,避免交换带来的延迟,你可能希望申请的内存常驻物理内存。在Linux系统中,可以通过以下几种方式来实现:
file能够查看文件的类型
1 | singheart@FX504GE:~/Project/assembly$ file libadd.so |
转载自https://blog.csdn.net/gao_zhennan/article/details/120717424#t8
我们知道, 计算机内部实际上只能存储或识别二进制.
在计算机中, 我们日常所使用的文档, 图片, 数字等, 在储存时, 实际上都要以二进制的形式存放在内存或硬盘中, 内存或硬盘就好像是一个被划分为许多小格子的容器, 其中每个小格子都只能盛放0或1...
本文转载自https://blog.csdn.net/qq_28119741/article/details/102815659
这里需要解决这几个问题
(1)什么是cpu缓存行
(2)什么是内存屏障
(3)什么是伪共享
(4)如何避免伪共享
a previous single-layer NVM database N2DB[14] used the snapshot isolation from PostgreSQL[17]. Its snapshot generation process involves taking a lock and scanning a global active transaction list, which blocks concurrent transactions and is not scalable
The snapshot isolation concurrency control implementation used in traditional MVCC databases is not well suited for NVM because of two reasons. (1) The concurrency control implementations of traditional databases mainly focus on their in-memory part without discussing durability and crash consistency. They leave those to another dedicated recovery protocol, such as ARIES or write-ahead logging. The situation is different in NVM databases because a single copy of data is used for both runtime access and durability. Ensuring crash consistency should unavoidably be part of the concurrency control itself. (2) Concurrency control methods from a two-layer architecture have suboptimal performance when directly applied to a single-layer NVM database. FOEDUS[28] points out that centralized components, such as lock manager and logs in traditional concurrency control implementations, will cause performance bottlenecks in a multicore NVM database. A previous NVM database N2DB[14] adopted the concurrency control from PostgreSQL[17] to implement snapshot isolation. The concurrency control scheme from PostgreSQL uses the currently completed transactions in the system to represent a snapshot. When generating a snapshot, it has to take a lock and scan the global active transaction list. This approach blocks concurrent transactions and is not scalable. N2DB also adopted the commit log in NVM to persistently store transaction status for crash consistency. The commit log is an array-like structure and is write-shared by all threads, which limits its scalability. Zen[29] also points out that traditional concurrency control methods often need to modify the tuple metadata not only by tuple writes but also by tuple reads, which incurs expensive NVM writes.