| Sun's profile孙涛的空间 : 大悲无泪,大悟无言,大笑无声。Blog | Help |
|
September 23 深夜了夜了,无法入睡。
风吹过,感觉很舒畅。听着熟悉的老歌,想想过去,想想将来,自己已经不再是学生了。
工作了一个月,碰到了太多从未接触的事情。有过担心,也有过努力,最后却已成习惯。
喆喆还在学校煎熬着,脱离的校园的我却回忆起学校的点滴。那么多的兄弟,每天的活动都是那么丰富。打球,游戏,打牌,吃饭,每一样都不再。也许正是有了这些朋友,我才能度过7年的大学时代。
September 18 今天你输出了没? HW很流传的一句话,也是很让人头疼的一句话。
不管新老员工,这句话都是无形的压力。
今天我把近几天看的知识整理了一下,也算是自己的输出了。反正别人是没人看的!也没什么价值!
September 17 侥幸 侥幸通过了软件编程规范考试,担心了好几天,幸好有惊无险。
看了一天的源代码,一个小小的算法我折磨我心里憔悴,终于将它攻破, 并在公司元老级代码上发现了两个小问题,可惜这个两个问题仅仅浪费了三个byte的使用,没有太大的影响。
看算法的具体实现有什么用?我一直在考虑这个问题。今天和一个编程高手浅浅谈了几句,得知他看代码极少涉及具体实现,重点关注的是类的接口和各个类之间的调用关系,这样才能更快的利用这个类。也许这样才是对的! September 16 害怕明天 明天又要上班了,又有了新的任务和压力,又有了新的苦恼。
都不想去那个鬼地方了,没人管,没人教,弄不好还得看别人脸色,可能是我运气背吧。
今天看书也小有收获,希望能对明天理解代码带来一点效果。
都说不懂就要问,我可师父也不懂,我向谁问啊?我也没坐在我们小组附近,总不能一有不懂就跑过去,弄的和个二百五似的,向周边的人请教更麻烦了,他们一个个都忙的不可开交,我又怎么好意思麻烦,再说大家实在不熟,也没有机会让我去熟悉。
就这样,整天把代码翻来翻去,Visual C++和MSDN开了又关,如此反复。我自己都烦了。再这么下去,我要疯了! Using File Mapping(二)To read from a file view, a process dereferences the pointer returned by the MapViewOfFile function:
DWORD dwLength; dwLength = *((LPDWORD) lpMapAddress); The process also uses the pointer returned by MapViewOfFile to write to the file view:
*((LPDWORD) lpMapAddress) = dwLength;The FlushViewOfFile function copies the specified number of bytes of the file view to the physical file, without waiting for the cached write operation to occur:
if (!FlushViewOfFile(lpMapAddress, dwBytesToFlush)) { ErrorHandler("Could not flush memory to disk."); } Cleaning Up Each process uses the UnmapViewOfFile function to invalidate the pointer to the mapped memory. This destroys the file view in the address space of the process. If any pages of the file view have changed since the file view was mapped, UnmapViewOfFile also copies the changed pages to the file on disk.
if (!UnmapViewOfFile(lpMapAddress)) { ErrorHandler("Could not unmap view of file."); } When each process finishes using the file-mapping object and has umapped all views, it must close the file mapping object's handle by calling CloseHandle.
CloseHandle(hMapFile); Using File Mapping(一) The first process calls the CreateFileMapping function to create a file-mapping object and give it the name
MyFileMappingObject. By using the PAGE_READWRITE flag, the processes will have read/write permission to the memory through any file views that are created. HANDLE hMapFile; hMapFile = CreateFileMapping(hFile, // Current file handle. NULL, // Default security. PAGE_READWRITE, // Read/write permission. 0, // Max. object size. 0, // Size of hFile. "MyFileMappingObject"); // Name of mapping object. if (hMapFile == NULL) { ErrorHandler("Could not create file-mapping object."); } The process then uses the file-mapping object handle returned by CreateFileMapping in the call to MapViewOfFile to create a view of the file in the process's address space. The MapViewOfFile function returns a pointer to the file view.
LPVOID lpMapAddress; lpMapAddress = MapViewOfFile(hMapFile, // Handle to mapping object. FILE_MAP_ALL_ACCESS, // Read/write permission 0, // Max. object size. 0, // Size of hFile. 0); // Map entire file. if (lpMapAddress == NULL) { ErrorHandler("Could not map view of file."); } The second process calls the OpenFileMapping function with the name
MyFileMappingObject to use the same file-mapping object as the first process. Like the first process, the second process uses the MapViewOfFile function to obtain a pointer to the file view. HANDLE hMapFile; LPVOID lpMapAddress; hMapFile = OpenFileMapping(FILE_MAP_ALL_ACCESS, // Read/write permission. FALSE, // Do not inherit the name "MyFileMappingObject"); // of the mapping object. if (hMapFile == NULL) { ErrorHandle("open file-mapping object."); } lpMapAddress = MapViewOfFile(hMapFile, // Handle to mapping object. FILE_MAP_ALL_ACCESS, // Read/write permission. 0, // Max. object size. 0, // Size of hFile. 0); // Map entire file. if (lpMapAddress == NULL) { ErrorHandler("Could not map view of file."); } 全赖有你---很喜欢的一首歌全赖有你 继续糊涂 今天又胡里胡涂的过,该看的书没看,不该干的事情却干了不少了。
不过好歹买了摄像头和耳麦,以后喆喆的生活中将会有声音和图像了,呵呵。信息时代,就是不一样。
明天我该做什么,毫无计划。也许看抽自己两耳光,让自己好好清醒,当前的形式不乐观,我还尚需努力。
要困了,可还有好多衣服没洗,积累了一个星期,明天都没得穿了,袜子也臭了,我自己都无法忍受了。一个人就是这么邋遢,郁闷。 September 14 今天回来比较早 回来的比较早,回来的目的是看书,补充知识。
可坐在电脑面前,看着满是ABC的电子书,我大脑就麻木了,神经就崩溃了,不知所云。
明天还得去公司看看,唉,周末了,也不能好好休息! September 13 这下我可郁闷了我师父的要求太高了,每晚我九点回家,他还嫌早了,要我呆到11点多。还想不想我活了?
每天对这电脑,看着一堆看不懂的代码,从来没有过的挫折感。
马上就中秋了,以前对这个节日没什么感觉,现在才发现身在异乡是好孤独。 September 10 明天的考试明天有一个软件编程规范考试,是到华为公司后最重要的一次考试了,考不过会很麻烦。
已经看资料好几天了,也看了相关练习。我师父每天都催我,说我不够用功,真郁闷。要是考砸了,给他的印象就要大打折扣了
祝自己好运吧
September 09 工作的感觉!和预想的有太多的不一样。
在公司,我能做些什么?除了每天上下班打卡,我只能望着电脑发呆了。
太多的规矩,极具压力的考试,都让我很不适应。也许是刚到公司,对一切都太小心。
进部门快半个月了,每天看着周围的人忙碌,感觉自己太渺小。对他们来说,我根本可有可无,根本对他们毫无帮助,更不用说能对公司作出什么成绩了。也许我太急功近利,一切都应该脚踏实地。 |
|
|