or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
2017q3 Homework2 (prefix-search)
contributed by <
shanshow
>其餘問題
執行 make 時遇到問題
tst_suggest 程式碼的隱憂與改進
根據作業的教學,執行
會得到
根據老師在 facebook 上提供的zhanyangch共筆,可以得知在 choice:s 的情況下搜尋"A"會產生錯誤。
參考資料:wiki
ubuntu論壇
在tst.h中可找到介紹用法的註解
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →在tst.c中則可找到關於這
函數函式的用法function 不做數學運算用途時,應該翻譯為「函式」
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →再次執行後,可以發現它搜索了前1024個前頭為A的單詞
REF的實作
參考st9007a共筆
作業中有提及,可從tst.h中的註解找到參考
前往 tst.c 找尋 tst_ins_del()
參考共筆,在tst_ref.c中先劃好記憶體空間。
在更動途中遇到下列錯誤:
VS
註解寫明,如果最後的字串出現,會依照上列判斷式決定是否清除字串, CPY 模式下可以照常運作但是在 REF 狀態下會產生錯誤。
tst_del_word(root, curr, &stk, 1);
因此,在 tst.c 中,為了避免錯誤而又不讓 CPY 模式下的環境出現變化,將常數1的位置上填入 CPY ,如此一來 CPY 模式下能夠判斷為 TRUE ,而 REF 模式下能夠判斷為 FALSE 從而避免錯誤。
效能測試:
參考zhanyangch同學之共筆
在 Makefile 內放入 bench
「釋放所有 cache 記憶體空間」這段描述是錯誤的,請找 Linux 核心文件並修正
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →build 速度

search 速度

原因 :
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →參考資料:
跟我一起写Makefile:MakeFile介绍
釋放Linux記憶體
linux 指令 - tee
在 Linux 中以特定的 CPU 核心執行程式
Linux的进程优先级
Linux 效能分析工具: Perf