⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 store_buff.c

📁 代码优化,有效使用内存,透视优化技术,对比优化方法,如果你在追求代码效率的最大化,该资源你不能不读.
💻 C
字号:
/* ---------------------------------------------------------------------------
 *
 *			DEMONSTRATION OF SPONTANEOUS FLUSHING OF STORE BUFFERS
 *			=====================================================
 *
 * Build 0x001 08.08.2002
--------------------------------------------------------------------------- */
#include <DoCPU.h>

#include "store_buff.h"			// h-file is generated automatically 
								// by the make-file and contains definition of N_ITER,
								// which stands for number of write iterations

main()
{
	int		*p;
	int		a, b;
	int		*buff;

	// allocating memory
	p = (int *) malloc(1*M);

	// sleep, in order to hit exact time quantum
	Sleep(100);
	
	// call store_buf.xm
	buff = DoCPU(&p);

	// display measurement results
	printf("%d",N_ITER);for(a = 0; a < 10; a++) printf("\t%d",buff[a]);
	printf("\n");

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -