diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2006-10-17 19:40:57 +0200 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2006-10-17 19:40:57 +0200 |
commit | d515936ea7f98f6aaa9217699796beadef9d664b (patch) | |
tree | 78d2f0abf4f8c16e53a47c561a535903d72596af /linux-core/drm_hashtab.c | |
parent | 5443dbe35f182b9286a96d24d29037d5cb625e3d (diff) |
Add memory usage accounting to avoid DOS problems.
Diffstat (limited to 'linux-core/drm_hashtab.c')
-rw-r--r-- | linux-core/drm_hashtab.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-core/drm_hashtab.c b/linux-core/drm_hashtab.c index 63ee5f91..3a2aa80e 100644 --- a/linux-core/drm_hashtab.c +++ b/linux-core/drm_hashtab.c @@ -44,7 +44,7 @@ int drm_ht_create(drm_open_hash_t *ht, unsigned int order) ht->order = order; ht->fill = 0; ht->table = NULL; - ht->use_vmalloc = ((ht->size * sizeof(*ht->table)) > 4*PAGE_SIZE); + ht->use_vmalloc = ((ht->size * sizeof(*ht->table)) > PAGE_SIZE); if (!ht->use_vmalloc) { ht->table = drm_calloc(ht->size, sizeof(*ht->table), DRM_MEM_HASHTAB); |