     head.num_inst++;
 
     if (head.num_inst > 0) {
-        char *code;
-        code = new char[sizeof(head) + sizeof(inst[0]) * head.num_inst];
-/*
-        gpuErrchk(cudaMallocHost((void**)&code,
-                                 sizeof(head) + sizeof(inst[0]) * head.num_inst));
-*/
+        char *code = new char[sizeof(head) + sizeof(inst[0]) * head.num_inst];
         memcpy(code, &head, sizeof(head));
         memcpy(code + sizeof(head), inst, sizeof(inst[0]) * head.num_inst);
 

gpu_match(char **codes, int num_codes, int urllen, int scheme_len,
          char *query, char *query_lower)
{
    //int idx = threadIdx.x * gridDim.x + blockIdx.x;
    int idx = blockIdx.x * blockDim.x + threadIdx.x;

    while (idx < num_codes) {

    cudaGetDeviceProperties(&deviceProp, 0);

    m_grid_dim = _ConvertSMVer2Cores(deviceProp.major, deviceProp.minor) * deviceProp.multiProcessorCount;
}

void
