if ((th = thread_rec (ptid, FALSE)))
return th;
- th = xcalloc (1, sizeof (*th));
+ th = XCNEW (win32_thread_info);
th->tid = tid;
th->h = h;
th->thread_local_base = (CORE_ADDR) (uintptr_t) tlb;
ReadProcessMemory (h, address_ptr, buf, len, &done);
else
{
- WCHAR *unicode_address = (WCHAR *) alloca (len * sizeof (WCHAR));
+ WCHAR *unicode_address = XALLOCAVEC (WCHAR, len);
ReadProcessMemory (h, address_ptr, unicode_address, len * sizeof (WCHAR),
&done);