C/C++
文章平均质量分 75
你死到临头了
当心你的背后
展开
-
连续声明的几个int型变量内存地址不连续
其实这里得变量只是指局部变量#include <stdio.h>int g1 = 0,g2 = 0,g3 = 0;int main(){ static int s1 = 0,s2 = 0, s3 = 0; int l1 = 0, l2 = 0,l3 = 0; printf("0x%08x\n",&l1); printf("0x%08x\n",&l2); pr原创 2015-11-04 12:50:10 · 3806 阅读 · 0 评论 -
SSD6 Exercise1 深入分析
题目Take Assessment: Exercise 1: Decoding LabDecoding Lab: Understanding a Secret MessageYou have just intercepted an encoded message. The message is a sequence of bits which reads as follows in hexadeci原创 2015-11-04 21:55:57 · 5454 阅读 · 2 评论 -
C/C++常识
1.局部变量和数组在内存栈结构中的分配细节#include <stdio.h>#define ARRAY_SIZE 10void natural_numbers(void) { int i; int array[ARRAY_SIZE]; i = 1; while (i <= ARRAY_SIZE) { array[i] = i - 1;原创 2015-12-17 00:31:43 · 536 阅读 · 0 评论 -
cache line 对程序性能的影响
http://igoro.com/archive/gallery-of-processor-cache-effects/原创 2016-01-10 20:57:39 · 503 阅读 · 0 评论